You are not logged in.

#1 2006-07-13 06:22:46

rshetye
Member
Registered: 2004-02-10
Posts: 11

Segmentation fault: pacman, firefox, ssh - "beyond&quot

hi,

After the latest update, my pacman gives a "segmentation fault" at the point of contacting ftp://ftp.archlinux.org:21

pacman.static gives the exact same error  :shock:

So I am stuck without any upgrade facility.

firefox is also crashing with a segmentation fault

SSHD comes up fine, but if I try to connect to it from another machine, it cuts the network connection with the client even before it asks me for a username.

I have a suspicion this is some sort of a fork-related screw-up. I don't have strace or ltrace on my system so I can't help with that.

I am using the beyond kernel (2.6.17-beyond1), so I went back to a custom "beyond" kernel (2.6.16-beyond4.1) that had been built by me and previously tested. Same problems, so I don't think the kernel is the problem. My suspicion is some sort of forking related problem in glibc ?

thanks.

Offline

#2 2006-07-13 06:28:01

rshetye
Member
Registered: 2004-02-10
Posts: 11

Re: Segmentation fault: pacman, firefox, ssh - "beyond&quot

10 seconds and I am back with a hint already!!

I am a fricking genius ... I think ?

No answers yet, but this is definitely a DNS resolution issue.

pacman crashes on the DNS resolution of ftp.archlinux.org - I replace "ftp.archlinux.org" with "209.85.41.133" and it worked fine!!!

So devs - you have your job cut out for you.

Edit: I use dnsmasq as my DNS server on my Arch machine.

thanks.

Offline

#3 2006-07-13 06:30:54

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: Segmentation fault: pacman, firefox, ssh - "beyond&quot

Do you have "wins" listed in /etc/nsswitch.conf? having it there should kill most static compiled programs, but for the dynamic ones: that would be a samba bug.

Offline

#4 2006-07-13 08:48:55

rshetye
Member
Registered: 2004-02-10
Posts: 11

Re: Segmentation fault: pacman, firefox, ssh - "beyond&quot

Edit: Yes, I do have a wins entry in my /etc/nsswitch.conf - so I take back my statement that its not there and its not related to samba.

I removed the wins entry and now the ping is fine.

I put it back and things start breaking.

ping crashes for me when its doing gethostbyname (I was able to install ltrace and profile the ping crash using that), so, this is definitely a libresolv.so.2 bug, in the gethostbyname() function. This means it is a glibc bug.

# ltrace ping www.yahoo.com

__libc_start_main(0x8049b80, 2, 0xbfba1eb4, 0x804da70, 0x804da60 <unfinished>
socket(2, 3, 1)                                  = -1
__errno_location()                               = 0xb7e4a690
getuid()                                         = 1000
setuid(1000)                                     = 0
getopt(2, 0xbfba1eb4, "h?VQ:I:M:aUc:dfi:w:l:S:np:qrs:vL"...) = -1
inet_aton("www.yahoo.com", 0x8060418)            = 0
gethostbyname("www.yahoo.com" <unfinished>
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

# ldd `which ping`

linux-gate.so.1 =>  (0xffffe000)
        libresolv.so.2 => /lib/libresolv.so.2 (0xb7fa2000)
        libc.so.6 => /lib/libc.so.6 (0xb7e84000)
        /lib/ld-linux.so.2 (0x80000000)

# pacman -Qo /lib/libresolv.so.2

/lib/libresolv.so.2 is owned by glibc 2.4-2

[/b]

Offline

#5 2006-07-15 14:24:10

jw
Member
Registered: 2005-01-08
Posts: 88

Re: Segmentation fault: pacman, firefox, ssh - "beyond&quot

I'm having the same problem. A command like `ping foo' results in a segmentation fault. Am using kernel beyond as well. Could you post a bug report please?


EDIT - Just found out something weird. On my box the segfault only occurs if samba is installed!

 
root@athlonxp home $ /etc/rc.d/samba start
:: Starting Samba Server                                                                                                               [DONE]
root@athlonxp home $ ping foo
Segmentation fault
root@athlonxp home $ /etc/rc.d/samba stop
:: Stopping Samba Server                                                                                                               [DONE]
root@athlonxp home $ ping foo
Segmentation fault
root@athlonxp home $ pacman -R samba
removing samba...
warning: /etc/pam.d/samba saved as /etc/pam.d/samba.pacsave
warning: /etc/logrotate.d/samba saved as /etc/logrotate.d/samba.pacsave
done.
root@athlonxp home $ ping foo
ping: unknown host foo

Note that stopping the samba service has no effect. Samba has to be removed in order for the segfaults to go away.  :?


EDIT 2 - Must be related to this problem:
http://bbs.archlinux.org/viewtopic.php?t=23164

Offline

#6 2006-07-15 22:41:32

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: Segmentation fault: pacman, firefox, ssh - "beyond&quot

it's a bug in the samba WINS module. The WINS module uses some character conversion map, which is not initialized before use, resulting in segmentation faults. Remove wins from /etc/nsswitch.conf and all it fine. A bugreport is in flyspray marked as high priority for this, expect an update soon.

Offline

#7 2006-07-17 18:41:49

Stalwart
Member
From: Latvia, Riga
Registered: 2005-10-18
Posts: 445
Website

Re: Segmentation fault: pacman, firefox, ssh - "beyond&quot


IRC: Stalwart @ FreeNode
Skype ID: thestalwart
WeeChat-devel nightly packages for i686

Offline

#8 2006-07-17 18:58:53

Stalwart
Member
From: Latvia, Riga
Registered: 2005-10-18
Posts: 445
Website

Re: Segmentation fault: pacman, firefox, ssh - "beyond&quot

Found temporary workaround:

IgnorePkg   = kernel26beyond


IRC: Stalwart @ FreeNode
Skype ID: thestalwart
WeeChat-devel nightly packages for i686

Offline

Board footer

Powered by FluxBB