Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Irssistats segmentation fault. Maybe from a kernel option?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Elekrep
Tux's lil' helper
Tux's lil' helper


Joined: 18 Sep 2004
Posts: 108
Location: Finland

PostPosted: Sun Jul 17, 2011 10:19 pm    Post subject: Irssistats segmentation fault. Maybe from a kernel option? Reply with quote

I just changed from my old gentoo box to a new one and with it my irssistats/irssi. The systems are essentially the same and I eliminated the chance of a file permission error with testing 777 privileges.. Support from the developer is kind of dead, someone else has posted the same error on irssistats forum in 2010 and hasn't gotten a reply.

The script halts at this point:
Code:

within log file, day 110 changed to: Mon Oct 20 2008
allocating more users : 2000
Segmentation fault


As I mentioned, the script still works in the old box, but not in my new one. I'm thinking it might be some (new) kernel option that might prevent memory allocation in some way while a program is running. That's the only thing I can think of that is different in the 2 systems.

Any thoughts ?
_________________
http://muronurkka.no-ip.org/
Tällä hetkellä pdf, josta saattaa olla apua gentoo palomuurin ja netinjaon virittämiseen.
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Sun Jul 17, 2011 10:45 pm    Post subject: Reply with quote

You can test if it's a kernel problem by either booting your new kernel on the old install (which might be problematic with all the changes that have happened with udev and things of that sort, not to mention hardware differences), or by copying your old system into a chroot on the new one and trying it from the chroot.

If it turns out to not be a kernel problem, it could be something related to another library it loads, so those things may be suspect as well.

You might also try running it under strace and see if the last messages before the crash indicate what the program's trying to do at that moment.
Back to top
View user's profile Send private message
Elekrep
Tux's lil' helper
Tux's lil' helper


Joined: 18 Sep 2004
Posts: 108
Location: Finland

PostPosted: Sun Jul 17, 2011 11:49 pm    Post subject: Reply with quote

BradN wrote:
You can test if it's a kernel problem by either booting your new kernel on the old install (which might be problematic with all the changes that have happened with udev and things of that sort, not to mention hardware differences), or by copying your old system into a chroot on the new one and trying it from the chroot.

If it turns out to not be a kernel problem, it could be something related to another library it loads, so those things may be suspect as well.

You might also try running it under strace and see if the last messages before the crash indicate what the program's trying to do at that moment.


Yeah, the hardware is different so it would be hard, but it works on the old system, since it ran the script right before I switched it to the new server.

anyways strace:
Code:

write(2, "allocating more users : 2000\n", 29) = 29
mremap(0xb76ed000, 245760, 491520, MREMAP_MAYMOVE) = 0xb7675000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++


mremap seems to be causing the stop, but I got no idea what to do about it :)
_________________
http://muronurkka.no-ip.org/
Tällä hetkellä pdf, josta saattaa olla apua gentoo palomuurin ja netinjaon virittämiseen.
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Mon Jul 18, 2011 12:51 am    Post subject: Reply with quote

Hmm, you're not using selinux or things like that? I know sometimes that can lead to strange segfaults when the security settings don't allow certain things.

Otherwise I'd try the copy-over of the old system (can be done over the network) and try from chrooting into that.

system cloning over the network the easy way:

first on source system:
mkdir /mnt/copy
mount -o bind / /mnt/copy
(if you have other partitions, eg /usr, also bind mount them into /mnt/copy/..., like mount -o bind /usr /mnt/copy/usr)

then on target system:
mkdir /path/to/where/you/want/chroot
cd /path/to/where/you/want/chroot
ssh sourcesystem "cd /mnt/copy; tar -cz ." | tar -xzv

afterwards clean up the bind mount(s) on the source system:
umount /mnt/copy/usr #(if you have such partition, and/or any others)
umount /mnt/copy
rmdir /mnt/copy
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 437

PostPosted: Mon Jul 18, 2011 5:31 am    Post subject: Reply with quote

The call the mremap is succesful though, so I think that one may be a red herring. But it make me realize the problem here might be glibc - there was a change to memcpy() - applications were relying on undefined behavior when the addresses overlapped. and when the new (faster) implementation was added things starting breaking. Although I'm not sure if that's the bug being hit Valgrind may offer some clues.
Back to top
View user's profile Send private message
Elekrep
Tux's lil' helper
Tux's lil' helper


Joined: 18 Sep 2004
Posts: 108
Location: Finland

PostPosted: Mon Jul 18, 2011 2:25 pm    Post subject: Reply with quote

Well the kernel has some selinux settings selected by default, but I haven't changed any of them. It's a home server and so I figured it would be too much of a hassle to implement all of that real selinux stuff.
Anyways, copying the old system over the new one does sound kind of hazardous, especially when I kind of wrecked it when I backed it up by changing file rights all over. The config files need root access and I don't allow remote root login which in turn made it hard to copy stuff with samba/winscp. Most likely there would of been a road past those problems, but since the old system is going to be formatted, I figured why bother. I'd rather not mess up my freshly installed system as I spent a long time to get it booting because of the bugs in the install cd and baselayout.

I'll have to plug in my old server back, to see if the glibc is of a different version. It is possible that I haven't updated those in it. Was there some 1 command that will list all the essential libraries and their versions ? Would make it alot easier to compare.
_________________
http://muronurkka.no-ip.org/
Tällä hetkellä pdf, josta saattaa olla apua gentoo palomuurin ja netinjaon virittämiseen.
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Mon Jul 18, 2011 4:39 pm    Post subject: Reply with quote

Not copying the old system over the new one, copying the old system into a subdirectory of the new one.

Also you made me remember I forgot the permissions flag on the untar command, that line should read:

ssh sourcesystem "cd /mnt/copy; tar -cz ." | tar -xzvp


To find all the versions of libraries a program uses, run ldd on its binary.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum