Bug 137128 - amanda-2.4.5-2: SIGSEGV in amadmin <CONFNAME> due (regression from 9.3)
Summary: amanda-2.4.5-2: SIGSEGV in amadmin <CONFNAME> due (regression from 9.3)
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: ConsoleApps (show other bugs)
Version: Final
Hardware: i686 SuSE Linux 10.0
: P5 - None : Major
Target Milestone: ---
Assignee: Pavel Nemec
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-06 12:22 UTC by Matthias Andree
Modified: 2006-07-31 09:21 UTC (History)
1 user (show)

See Also:
Found By: Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Andree 2005-12-06 12:22:25 UTC
running "amadmin FullBacks due" causes a segmentation fault on my machine.

amadmin at that time has read disklist, tapelist and configuration, and the crash happens here:

Program received signal SIGSEGV, Segmentation fault.
due (argc=3, argv=0x1c) at amadmin.c:747
747             for(dp = diskqp->head; dp != NULL; dp = dp->next)
(gdb) bt full
#0  due (argc=3, argv=0x1c) at amadmin.c:747
        dp = (disk_t *) 0xfffffffe
#1  0x0804a4bc in main (argc=3, argv=0xbfbbeb44) at amadmin.c:169
        fd = <value optimized out>
        conf_diskfile = <value optimized out>
        conf_infofile = <value optimized out>
        conffile = <value optimized out>

valgrind confirms this:

==22742== Invalid read of size 4
==22742==    at 0x804B7A0: due (amadmin.c:747)
==22742==    by 0x804A4BB: main (amadmin.c:169)
==22742==  Address 0x6 is not stack'd, malloc'd or (recently) free'd
==22742==
==22742== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==22742==  Access not within mapped region at address 0x6
==22742==    at 0x804B7A0: due (amadmin.c:747)
==22742==    by 0x804A4BB: main (amadmin.c:169)
==22742==
==22742==
Comment 1 Matthias Andree 2005-12-31 13:26:22 UTC
I've tested the current 2.4.5p1-20051218 snapshot and built it as RPM <http://home.pages.de/~mandree/suse-10.0-i586.de/>, which does not have the bug.
Comment 2 Pavel Nemec 2006-02-09 09:01:19 UTC
I tested affected file and compared it with newer version. Only minor change were here and not in important parts.
It is possible for you to test patched rpm ? 
Comment 3 Matthias Andree 2006-02-09 09:14:30 UTC
Yes, I can test patched RPMs.
Comment 4 Pavel Nemec 2006-02-09 09:20:45 UTC
Great,
10.0 i386 ? Or diferent hardware/distro?
Comment 5 Matthias Andree 2006-02-09 10:13:07 UTC
10.0 i386.
Comment 6 Pavel Nemec 2006-02-09 16:47:55 UTC
Could you please check log (with SIGSEGV version) for string
"could not load disklist could not load disklist"
?
I created patched version of amanda. Should be here
http://beta.suse.com/private/pnemec/
(in 15 minutes - mirroring)
Please try it and post gdb or valgrind output here. 

Thank you
Comment 7 Matthias Andree 2006-02-16 16:13:41 UTC
I've installed it, and this is what I get:

amanda@merlin:~> valgrind --quiet --num-callers=16 amadmin FullBacks due
Due in  5 days: merlin:/etc
==15437== Invalid read of size 4
==15437==    at 0x804B4E8: due (in /usr/sbin/amadmin)
==15437==    by 0x804EA1B: main (in /usr/sbin/amadmin)
==15437==  Address 0x6 is not stack'd, malloc'd or (recently) free'd
==15437==
==15437== Process terminating with default action of signal 11 (SIGSEGV)
==15437==  Access not within mapped region at address 0x6
==15437==    at 0x804B4E8: due (in /usr/sbin/amadmin)
==15437==    by 0x804EA1B: main (in /usr/sbin/amadmin)
Segmentation fault

If this does not help, I'll try to recompile with -ggdb3 next week.
Comment 8 Pavel Nemec 2006-03-31 10:43:20 UTC
Nadvornik find some wrong code. Could you please test fixed package?
http://beta.suse.com/private/pnemec/
Comment 9 Matthias Andree 2006-06-08 09:33:52 UTC
I somehow missed the package, there is no amanda at the URL given in comment #8.
Comment 10 Pavel Nemec 2006-06-23 12:05:34 UTC
I already delete it, because i thought you are not responding anymore. 
I put file back, so you can test it. 
Thank you for your concern.
Comment 11 Matthias Andree 2006-07-29 15:31:22 UTC
OK, I tried 2.4.5-2 again, it crashed.
I then updated to your amanda-2.4.5-10, which fixes this problem for me.
Comment 12 Pavel Nemec 2006-07-31 09:21:38 UTC
Great, i am closing this bug so.
Thanks for testing.