Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[msql-list] Problems with FreeBSD 7.0

1 view
Skip to first unread message

Doug Hardie

unread,
Apr 4, 2008, 5:47:01 PM4/4/08
to
I am encountering problems with msql 3.8 on FreeBSD 7.0. Some things
just crash. The latest one is multiple queries to the same database.
If I connect to the database and issue a query, I get the right
results. However, if I issue a second query that is basically the
same, just some of the values change, then malloc gives a segmentation
violation. The problem occurs in readQueryData. malloc has changed
in 7.0 in that it no longer pads the requested size to a full block.
I have had a few problems with that in my code. So I added 8 to each
of the malloc sizes and rebuilt msql. No change. Same error. I then
put a msqlClose after the first query and a msqlConnect after that.
The connect now fails the second time

Program received signal SIGSEGV, Segmentation fault.
0x280e6e12 in calloc () from /lib/libc.so.7
(gdb) where
#0 0x280e6e12 in calloc () from /lib/libc.so.7
#1 0x28148b8c in __hash_open () from /lib/libc.so.7
#2 0x281481b2 in dbopen () from /lib/libc.so.7
#3 0x28101d27 in getpwent_r () from /lib/libc.so.7
#4 0x2810362b in getpwent_r () from /lib/libc.so.7
#5 0x28135834 in nsdispatch () from /lib/libc.so.7
#6 0x28101264 in getpwuid_r () from /lib/libc.so.7
#7 0x281012b9 in getpwuid_r () from /lib/libc.so.7
#8 0x28100e7e in xdr_authunix_parms () from /lib/libc.so.7
#9 0x0804dac3 in msqlConnect ()
#10 0x08049e2f in main (argc=1, argv=0xbfbfec9c) at notify.c:179

I am at a loss at solving this problem. It is adversly affecting us.
What can I do to help resolve it?
-----------------------------------------------------------------
This is the Mini SQL Mailing List operated by Hughes Technologies
To unsubscribe, go to http://www.Hughes.com.au/extras/email/

Doug Hardie

unread,
Apr 4, 2008, 6:15:22 PM4/4/08
to


Finally found a workaround. I increased the size of some of the text
fields I had allocated by a bunch and malloc no longer fails. I have
no idea why this works. It was purely a desperation attempt. This
rendition of malloc is definitely weird.

David J. Hughes

unread,
Apr 4, 2008, 9:40:12 PM4/4/08
to

Doug,

Do you have a spare 7.0 box on the net I can access? Happy to run
this up and debug it if you have an appropriate box.

David
..

0 new messages