VOGONS


Linux ioctl seeking past end of disc

Topic actions

  • This topic is locked. You cannot reply or edit posts.

First post, by Snover

User metadata
Rank l33t++
Rank
l33t++

Ubuntu Linux 6.06; Linux 2.6.15-26-amd64-k8

I have been playing Under A Killing Moon this evening. Inexplicably, sometimes when swapping discs, the game will complain about being unable to find the file it's trying to load from the disk. Files all show up properly in ls. Unmount, remount, rescan in DOSBox, things seem to work OK. However, many times the initial video that it was trying to play just after the swap will not actually play, or the game will lock up after trying to load a file, or some assets later on after the disk swap (such as inventory videos) won't play until I restart DOSBox. I looked into dmesg, and found that there are tons of attempts to access data that's past the end of the disc. eg.

[79357.303841] sr0: rw=0, want=1254392, limit=1211224 [79357.303843] attempt to access beyond end of device [79357.303845] sr0: […]
Show full quote

[79357.303841] sr0: rw=0, want=1254392, limit=1211224
[79357.303843] attempt to access beyond end of device
[79357.303845] sr0: rw=0, want=1254396, limit=1211224
[79357.303848] attempt to access beyond end of device
[79357.303850] sr0: rw=0, want=1254400, limit=1211224
[79357.303852] attempt to access beyond end of device
[79357.303854] sr0: rw=0, want=1254404, limit=1211224
[79357.303858] attempt to access beyond end of device
[79357.303860] sr0: rw=0, want=1254336, limit=1211224
[79357.303862] attempt to access beyond end of device
[79357.303864] sr0: rw=0, want=1254340, limit=1211224

The mount command used (in dosbox.conf [autoexec]):

mount d /media/cdrom -t cdrom -usecd 0 -ioctl

I assume this is a problem with the use of -ioctl, but I'm not totally sure about where the fault lies: in the game itself, SDL, the kernel, or DOSBox. Any direction about assisting in debugging the problem would be appreciated. I am running a recent beta copy of DOSBox provided by Qbix with --enable-core-inline and --enable-debug, using the experimental dynamic_nodhfpu core.

To expand this to be a more generic CD-ROM problem thread, DOSBox does not provide a method to release all file handlers on CDs, so sometimes umount must be called with -l in order to make it possible to eject the disc. I wonder if this may be part of the problem.

Cheers,

Yes, it’s my fault.

Reply 2 of 3, by Snover

User metadata
Rank l33t++
Rank
l33t++

The disc reads seem to be OK as long as disc swap doesn't occur -- this problem only seems to happen on a swap.

(As an aside, I just realised that the dynamic core is actually not compiling in on x86_64, so I've been running with normal core. For shits and giggles I'm going to try forcing it to compile and see what sort of errors gcc puts out.)

Yes, it’s my fault.

Reply 3 of 3, by Snover

User metadata
Rank l33t++
Rank
l33t++

This seems to be more of a systemic problem, since I'm experiencing similar read issues doing file copies in Konqueror. Bugger. Fucking shitty nForce SATA controller. Something's seemingly getting cached that shouldn't be, since it seems to happen with similarly named files. Anyway, I'm closing this, because it's bogus bogus bogus!

Yes, it’s my fault.