Opened 19 years ago

Last modified 17 years ago

#1441 closed defect

mapserver receives SIGABRT from glibc — at Initial Version

Reported by: dirk@… Owned by: sdlime
Priority: high Milestone: 5.0 release
Component: MapServer C Library Version: 4.6
Severity: minor Keywords:
Cc: dmorissette

Description

I am using mapserver rel_4_6_0 from CVS on Gentoo development branch. After a
system (incl. glibc) upgrade mapserver did not work anymore. I waited a few more
glibc upgrades without change. I'm getting the following message (maptest is a
simple C program that opens the map and requests drawing):
dirk@junge ~/src/mapserver $ ./maptest 
*** glibc detected *** double free or corruption (!prev): 0x082ade00 ***
Aborted

(gdb) r
Starting program: /home/dirk/src/mapserver/maptest 
*** glibc detected *** double free or corruption (!prev): 0x08348e00 ***

Program received signal SIGABRT, Aborted.
0xb77b19b1 in kill () from /lib/libc.so.6
(gdb) bt
#0  0xb77b19b1 in kill () from /lib/libc.so.6
#1  0xb77b1635 in raise () from /lib/libc.so.6
#2  0xb77b2d4d in abort () from /lib/libc.so.6
#3  0xb77e48cc in __fsetlocking () from /lib/libc.so.6
#4  0xb77edc77 in mallopt () from /lib/libc.so.6
#5  0xb77ec7cf in mallopt () from /lib/libc.so.6
#6  0xb77edd8f in free () from /lib/libc.so.6
#7  0xb77dbd8a in fclose () from /lib/libc.so.6
#8  0x080932b3 in loadSymbolSet (symbolset=0x80e5204, map=0x6) at mapsymbol.c:643
#9  0x080581cf in loadMapInternal (filename=0x80c7840
"/usr/local/stc-lbs/maps.001/orient.map", 
    new_mappath=0x0) at mapfile.c:4340
#10 0x0804cc9b in main (argc=1, argv=0xbface8a4) at maptest.c:22

Setting a awatch point on msyyin, which is fclosed in mapsymbol.c:643 shows that
the file is closed in mapsymbol.c:389 before. The reason for that is a bug in my
symbol file. A patch will be attached that solved the problem for me.

I believe that it is the responsibility of glibc to check for validity of file
descriptors. However, when mapserver can be more clean ... why not.

Change History (1)

by dirk@…, 19 years ago

One solution to avoid fclosing files twice

Note: See TracTickets for help on using tickets.