VOGONS

Common searches


First post, by tthirtle

User metadata
Rank Newbie
Rank
Newbie

I am running Mandriva Linux limited edition 2005 awnd I am getting the following error when I type "./dosbox":

"*** glibc detected *** double free or corruption (out): 0xbffff230 ***
Aborted"

When I compiled the program I didnot see any errors.
I am running a 900 MHz celeron processer with a NVIDIA GeForce FX graphics chipset as my primary display. (I do not use my intel 810 graphics chipset that is built into the motherboard.)
What I would like to know is if there is a way to fix this

Reply 5 of 19, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

try gdb dosbox.
run
and see if it catches the exception.
Which version of GCC are you using and which version of Linux are your using (as not every linux has that double free corruption check)

Water flows down the stream
How to ask questions the smart way!

Reply 6 of 19, by tthirtle

User metadata
Rank Newbie
Rank
Newbie

after typing run I get get this:
Starting program: /usr/local/bin/dosbox
[Thread debugging using libthread_db enabled]
[New Thread -1211455808 (LWP 28368)]
ALSA lib pcm_dmix.c:868:(snd_pcm_dmix_open) unable to open slave
[New Thread -1212650576 (LWP 28382)]
*** glibc detected *** double free or corruption (out): 0xbffff210 ***

Program received signal SIGABRT, Aborted.
[Switching to Thread -1211455808 (LWP 28368)]
0xffffe410 in ?? ()
Current language: auto; currently c
(gdb)
I am running Mandriva linuix edition 2005 (mandrakelinux 10.2) which has the 2.6.11 kernel. I am also using gcc 3.4.3

Reply 7 of 19, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

at that moment could you type

bt

if it only shows ????
could you configure dosbox like this ?

CXXFLAGS="-O2 -ggdb3" ./configure 

Water flows down the stream
How to ask questions the smart way!

Reply 8 of 19, by tthirtle

User metadata
Rank Newbie
Rank
Newbie

After typing in bt it replies bash: bt: command not found
so I ran CXXFLAGS="-O2 -ggdb3" ./configure in the source directory (~/dosbox-0.65) and after running make and make install (as root) I still end up with
*** glibc detected *** double free or corruption (out): 0xbffff210 ***
Aborted

Am I missing any packages?

Reply 9 of 19, by MiniMax

User metadata
Rank Moderator
Rank
Moderator
tthirtle wrote:

After typing in bt it replies bash: bt: command not found

Try this:

$ gdb dosbox
Starting program: /usr/local/bin/dosbox
[Thread debugging using libthread_db enabled]
[New Thread -1211455808 (LWP 28368)]
ALSA lib pcm_dmix.c:868:(snd_pcm_dmix_open) unable to open slave
[New Thread -1212650576 (LWP 28382)]
*** glibc detected *** double free or corruption (out): 0xbffff210 ***

Program received signal SIGABRT, Aborted.
[Switching to Thread -1211455808 (LWP 28368)]
0xffffe410 in ?? ()
Current language: auto; currently c
(gdb) bt

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 10 of 19, by tthirtle

User metadata
Rank Newbie
Rank
Newbie

$ gdb dosbox
GNU gdb 6.3-3mdk (Mandrakelinux)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i586-mandrake-linux-gnu"...dosbox: No such file or directory.

(gdb) bt
No stack.
(gdb)

Reply 12 of 19, by tthirtle

User metadata
Rank Newbie
Rank
Newbie

(gdb) run
Starting program: /usr/local/bin/dosbox
[Thread debugging using libthread_db enabled]
[New Thread -1211455808 (LWP 2376)]
[New Thread -1212650576 (LWP 2387)]
*** glibc detected *** double free or corruption (out): 0xbffff210 ***

Program received signal SIGABRT, Aborted.
[Switching to Thread -1211455808 (LWP 2376)]
0xffffe410 in ?? ()
Current language: auto; currently c
(gdb) bt
#0 0xffffe410 in ?? ()
#1 0xbfffeef4 in ?? ()
#2 0x00000006 in ?? ()
#3 0xb7cd5049 in abort () from /lib/tls/libc.so.6
#4 0xb7d077ba in __fsetlocking () from /lib/tls/libc.so.6
#5 0xb7d0dd9c in malloc_trim () from /lib/tls/libc.so.6
#6 0xb7d0e37a in free () from /lib/tls/libc.so.6
#7 0x081636ad in CheckMounts ()
#8 0x08163871 in SDL_SYS_CDInit ()
#9 0x08148d95 in SDL_CDROMInit ()
#10 0x0814566e in SDL_InitSubSystem ()
#11 0x081456d4 in SDL_Init ()
#12 0x080eb41d in main (argc=1, argv=0xbffff694) at sdlmain.cpp:1276
(gdb)

Reply 13 of 19, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

That clearly shows that there is a problem in the SDL library on your system.
You might want to see if you can find out if that happends for more people. (As sdl is used by more games although the cdrom part is probably not used that often.).

Water flows down the stream
How to ask questions the smart way!

Reply 14 of 19, by tthirtle

User metadata
Rank Newbie
Rank
Newbie

my current sdl packages are as follows:
libSDL1.2-1.2.8-3mdk
libSDL_image1.2-1.2.4-1mdk
libSDL_mixer1.2-1.2.5
libSDL_net1.2-1.2.5-4mdk
libSDL_ttf2.0-2.0.7-1mdk
SDL-devel-1.2.10-1
Do I need to upgrade SDL?

Reply 15 of 19, by wirespot

User metadata
Rank Newbie
Rank
Newbie

DOSBox 0.65 under Debian unstable has been broken like this for a long time now.

Here's the backtrace:

#0  0xb7b12947 in raise () from /lib/tls/libc.so.6
#1 0xb7b140c9 in abort () from /lib/tls/libc.so.6
#2 0xb7b47fda in __fsetlocking () from /lib/tls/libc.so.6
#3 0xb7b4f89f in mallopt () from /lib/tls/libc.so.6
#4 0xb7b4f942 in free () from /lib/tls/libc.so.6
#5 0xb7e52d2c in SDL_CreateCond () from /usr/lib/libSDL-1.2.so.0
#6 0xb7e52f3c in SDL_CreateCond () from /usr/lib/libSDL-1.2.so.0
#7 0xb7dff4cf in SDL_CDOpen () from /usr/lib/libSDL-1.2.so.0
#8 0xb7dfa59b in SDL_InitSubSystem () from /usr/lib/libSDL-1.2.so.0
#9 0xb7dfa617 in SDL_Init () from /usr/lib/libSDL-1.2.so.0
#10 0x080f53cc in std::operator+<char, std::char_traits<char>, std::allocator<char> > ()
#11 0xb7afeea8 in __libc_start_main () from /lib/tls/libc.so.6
#12 0x0804d1e1 in ?? ()

If I disable the malloc checker with export MALLOC_CHECK_=0 and run dosbox again I get a plain old segfault. Here's the backtrace for this case:

#0  0xb7ad7966 in free () from /lib/tls/libc.so.6
#1 0xb7ddad86 in SDL_CreateCond () from /usr/lib/libSDL-1.2.so.0
#2 0xb7ddaf3c in SDL_CreateCond () from /usr/lib/libSDL-1.2.so.0
#3 0xb7d874cf in SDL_CDOpen () from /usr/lib/libSDL-1.2.so.0
#4 0xb7d8259b in SDL_InitSubSystem () from /usr/lib/libSDL-1.2.so.0
#5 0xb7d82617 in SDL_Init () from /usr/lib/libSDL-1.2.so.0
#6 0x080f53cc in std::operator+<char, std::char_traits<char>, std::allocator<char> > ()
#7 0xb7a86ea8 in __libc_start_main () from /lib/tls/libc.so.6
#8 0x0804d1e1 in ?? ()

This happens for both the binary DOSBox and the source-built one.

I've also run dosbox under valgrind and, interestingly enough, it did not crash anymore. I'm attaching the valgrind output.

Attachments

  • Filename
    val.6131.txt
    File size
    34.94 KiB
    Downloads
    281 downloads
    File license
    Fair use/fair dealing exception

Reply 16 of 19, by wirespot

User metadata
Rank Newbie
Rank
Newbie

Well I'll be damn, I just played around with MALLOC_CHECK_ and if I set it to 1 DOSBox works! According to this, that value causes the malloc checker to print errors to stdout. And indeed, I get a lot of lines like this:

*** glibc detected *** free(): invalid pointer: 0xbff99990 ***

...but it works. I'll test some more and get back if a crash happens again.

Reply 17 of 19, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

it happends in a initalisation of the cdrom by sdl according to the backtraces.

Water flows down the stream
How to ask questions the smart way!

Reply 18 of 19, by wirespot

User metadata
Rank Newbie
Rank
Newbie

Ha, it's not the CDROM, but I know what it is at last! You've given me an idea when you said CDROM though, and I saw that the one who started this thread uses Mandriva.

The "problem" seems to be with supermount. It's a kernel patch, I hear that Mandriva uses it in all its kernels, I use it too. You tell the kernel that a certain mountpoint is to be managed by supermount and it mounts it automatically if anything accesses it. It works over FUSE, if that's worth anything.

So, I tried taking supermount off the CDROM drive and dosbox still crashed. But when I disabled ALL the drives that use supermount it worked like a charm. So it appears that SDL probes all the mounted drives and it chokes if it finds even a single one that uses supermount, doesn't matter what it is (CDROM or not).

I'll see what I can dig up. I hope there's a way to tell SDL to not probe stuff. I've also let the guy who maintains the supermount patch know about this thread.

Giving up supermount is not an option, I have too many drives that use it (cdrom, floppy, card reader, USB stick, Windows partition). I'd go crazy mounting them by hand. Thank God at least that dosbox work with that MALLOC_CHECK trick.