First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 206579
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Toolchain Maintainers <toolchain@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Lubos Kolouch <lubos.kolouch@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 206579 depends on: Show dependency tree
Bug 206579 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2008-01-18 21:11 0000
When trying to connect to GPRS over bluetooth using wvdial,
wvdial segfaults after Init3 = AT+CGDCONT=1,"IP","internet","",0,0

Reproducible with all kernels (2.6.23-gentoo, 2.6.24-vanilla)

It works with the same setup in Arch Linux

Reproducible: Always

Steps to Reproduce:
1. wvdial --conf ~/wvdial.conf GPRS
2. segfault

Actual Results:  
--> WvDial: Internet dialer version 1.60
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","internet","",0,0
AT+CGDCONT=1,"IP","internet","",0,0
OK
--> Modem initialized.
Neoprávněný přístup do paměti (SIGSEGV)
(Unauthorized access to memory)


Expected Results:  
wvdial connects to GPRS network

wvdial.conf :

[Modem1]
Modem = /dev/rfcomm0
Baud=460800
SetVolume = 0
Dial Command = ATDT
Init1 = ATZ
Init2 = AT+CGDCONT=1,"IP","internet","",0,0
Init3 = ATM0
;FlowControl = CRTSCTS
;ISDN=0
Stupid Mode=1
Modem Type = Analog Modem
[Dialer GPRS]
Username = internet
Password = internet
Phone=*99#
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","internet","",0,0
Inherits = Modem1

emerge --info
Portage 2.1.4 (default-linux/x86/2007.0, gcc-4.2.2, glibc-2.7-r1, 2.6.24-rc8
i686)
=================================================================
System uname: 2.6.24-rc8 i686 Genuine Intel(R) CPU U2500 @ 1.20GHz
Timestamp of tree: Fri, 18 Jan 2008 19:30:08 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.3
dev-lang/python:     2.4.4-r5, 2.5.1-r5
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer
-mno-tls-direct-seg-refs"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf
/etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c
/etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer
-mno-tls-direct-seg-refs"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans
userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="cs en de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --stats --timeout=180 --exclude=/distfiles
--exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/home/portage/"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/gnome-experimental
/usr/portage/local/layman/jokey"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip X a52 aac aalib accessibility acl acpi additions alsa amr audiofile
bash-completion battery berkdb bitmap-fonts bluetooth bonobo bzip2 calendar
cddb cdinstall cdparanoia cdr chm clamav cli cpufreq cracklib crypt cups curl
dbus dell dga directory dri dvb dvd dvdr dvdread enblend encode exif extras fam
fat fax ffmpeg firefox flac foomaticdb fortran ftp gdbm gif gnome gnutls gpgme
gphoto2 gpm gtk hal hddtemp iconv icq imagemagick imlib ipw3945 isdnlog jabber
java javascript jfs jpeg jpeg2k kqemu libgda libnotify lm_sensors maildir mbox
midi mime mmx mmxext mono mp3 mpeg mplayer msn mudflap ncurses nls nocd nptl
nptlonly nsplugin ntfs offensive ogg ole opengl openmp pam pcmcia pcre pdf perl
plugins pmu png pop ppds pppd python quicktime radio rar rdesktop readline real
reflection reiserfs samba sasl scanner sdl session sidebar sift slang smime
smtp snmp spell spl sqlite sse sse2 ssl synaptics szip tcpd tetex tiff timidity
toolbar truetype truetype-fonts type1-fonts unicode usb v4l v4l2 video vorbis
wifi win32codecs x86 xcomposite xfce xfs xorg xrandr xscreensaver xvid zlib"
ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare
dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw
multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias
auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm
authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache
dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache
filter headers include info log_config logio mem_cache mime mime_magic
negotiation rewrite setenvif speling status unique_id userdir usertrack
vhost_alias" CAMERAS="canon adc65 agfa cl20 aox barbie casio clicksmart310
digigr8 digita dimera directory enigma13 fuji gsmart300 hp215 iclick jamcam
jd11 kodak konica largan lg_gsm mars minolta mustek panasonic pccam300 pccam600
polaroid ptp2 ricoh samsung sierra sipix smal sonix sonydscf1 sonydscf55
soundvision spca50x sq905 tv0674 stv0680 sx330z template toshiba" ELIBC="glibc"
INPUT_DEVICES="synaptics keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad
cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="cs en
de" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint
i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3
s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via
vmware voodoo"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


strace wvdial --conf wvdial.conf GPRS (last part)

write(3, "AT+CGDCONT=1,\"IP\",\"internet\",\"\","...,
35AT+CGDCONT=1,"IP","internet","",0,0) = 35
write(3, "\n", 1
)                       = 1
write(3, "OK", 2OK)                       = 2
write(3, "\n", 1
)                       = 1
gettimeofday({1200690587, 11872}, NULL) = 0
write(3, "--> ", 4--> )                     = 4
write(3, "Modem initialized.", 18Modem initialized.)      = 18
write(3, "\n", 1
)                       = 1
gettimeofday({1200690587, 12195}, NULL) = 0
time(NULL)                              = 1200690587
select(0, [], [], [], {0, 0})           = 0 (Timeout)
gettimeofday({1200690587, 12366}, NULL) = 0
time(NULL)                              = 1200690587
sigprocmask(SIG_BLOCK, NULL, [])        = 0
sigprocmask(SIG_BLOCK, NULL, [])        = 0
sigprocmask(SIG_SETMASK, [], NULL)      = 0
sigprocmask(SIG_BLOCK, NULL, [])        = 0
mmap2(0xaff00000, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xaff00000
sigprocmask(SIG_SETMASK, [], NULL)      = 0
sigprocmask(SIG_BLOCK, NULL, [])        = 0
sigprocmask(SIG_BLOCK, NULL, [])        = 0
sigprocmask(SIG_SETMASK, [], NULL)      = 0
sigprocmask(SIG_BLOCK, NULL, [])        = 0
sigprocmask(SIG_SETMASK, [], NULL)      = 0
sigprocmask(SIG_BLOCK, NULL, [])        = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

------- Comment #1 From Alin Năstac 2008-01-20 08:59:42 0000 -------
Please follow http://www.gentoo.org/doc/en/bugzilla-howto.xml and post here the
backtrace.

------- Comment #2 From Lubos Kolouch 2008-01-20 10:05:51 0000 -------
(gdb) run
Starting program: /usr/bin/wvdial --conf /home/kolcon/wvdial.conf GPRS
--> WvDial: Internet dialer version 1.60
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","internet","",0,0
AT+CGDCONT=1,"IP","internet","",0,0
OK
--> Modem initialized.

Program received signal SIGSEGV, Segmentation fault.
0xb7c2110f in makecontext () from /lib/libc.so.6
(gdb) 

(gdb) bt
#0  0xb7c2110f in makecontext () from /lib/libc.so.6
#1  0xb7d644f3 in WvTaskMan::do_task () from /usr/lib/libwvbase.so.4.4
#2  0x00000001 in ?? ()
#3  0x0806dc10 in ?? ()
#4  0xb7d33768 in ?? () from /usr/lib/libwvbase.so.4.4
#5  0xb7da5ff4 in ?? () from /usr/lib/libwvbase.so.4.4
#6  0x00000080 in ?? ()
#7  0x0806dd94 in ?? ()
#8  0x0806dc10 in ?? ()
#9  0xb7ff36a0 in ?? () from /lib/ld-linux.so.2
#10 0xb7d6472e in WvTaskMan::_stackmaster () from /usr/lib/libwvbase.so.4.4
#11 0xb7d647fa in WvTaskMan::stackmaster () from /usr/lib/libwvbase.so.4.4
#12 0xb7d64140 in ?? () from /usr/lib/libwvbase.so.4.4
#13 0x0806dc10 in ?? ()
#14 0x00000000 in ?? ()
(gdb) 

------- Comment #3 From Alin Năstac 2008-01-20 10:35:17 0000 -------
Build wvstreams with debug USE flag and with FEATURES=nostrip and post the
backtrace.

------- Comment #4 From Lubos Kolouch 2008-01-20 10:59:39 0000 -------
(gdb) bt
#0  0xb7b2d10f in makecontext () from /lib/libc.so.6
#1  0xb7c704df in WvTaskMan::do_task () at utils/wvtask.cc:513
#2  0xb7c70708 in WvTaskMan::_stackmaster () at utils/wvtask.cc:429
#3  0xb7c707ca in WvTaskMan::stackmaster () at utils/wvtask.cc:386
#4  0xb7c70120 in ?? () from /usr/lib/libwvbase.so.4.4
#5  0x0806dc10 in ?? ()
#6  0x00000000 in ?? ()

------- Comment #5 From Lubos Kolouch 2008-01-28 10:00:21 0000 -------
Should I try something like emerge -e system, emerge -u world etc.?

------- Comment #6 From Alin Năstac 2008-01-28 10:07:13 0000 -------
No.
I tried to bump wvstreams version to 4.4.1 but the included gnulib is utterly
broken and I didn't had time to fix it.

------- Comment #7 From Lubos Kolouch 2008-01-28 10:18:34 0000 -------
Thank you for your great efforts. I will wait, though it is currently stopping
me completely from using gentoo :((

------- Comment #8 From Jan de Groot 2008-03-24 21:39:22 0000 -------
This is not a bug in wvdial or wvstreams, but a bug in gentoo's glibc package.

On archlinux the same bug was reported by one of our users, and after looking
at valgrind outputs, we found out that glibc was reading invalid memory in the
make/getcontext functions.

The cause of this problem is 0060_all_glibc-2.7-i386-
makecontext-align-BZ5435.patch. It should be removed, or fixed using an
additional patch from upstream CVS. On archlinux we apply the additional patch,
which can be found here:
http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/base/glibc/fix-makecontext.patch?rev=1.1&content-type=text/vnd.viewcvs-markup

------- Comment #9 From Peter Volkov 2008-03-26 10:36:40 0000 -------
toolchain guys, please, review comment #8.

------- Comment #10 From ammar wk 2008-05-05 06:37:36 0000 -------
(In reply to comment #8)
> This is not a bug in wvdial or wvstreams, but a bug in gentoo's glibc package.
> 
> On archlinux the same bug was reported by one of our users, and after looking
> at valgrind outputs, we found out that glibc was reading invalid memory in the
> make/getcontext functions.
> 
> The cause of this problem is 0060_all_glibc-2.7-i386-
> makecontext-align-BZ5435.patch. It should be removed, or fixed using an
> additional patch from upstream CVS. On archlinux we apply the additional patch,
> which can be found here:
> http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/base/glibc/fix-makecontext.patch?rev=1.1&content-type=text/vnd.viewcvs-markup
> 

patch not found ?

anyway, ive already tried another patch but not working et all,
somebody with working help ?

------- Comment #11 From Disaster 2008-05-09 09:44:37 0000 -------
correct link:
http://repos.archlinux.org/viewvc.cgi/glibc/trunk/fix-makecontext.patch?revision=1

but doesn't solve for me (glibc 2.7 on x86)

------- Comment #12 From Ruediger Gad 2008-05-18 12:20:29 0000 -------
Manually applying the changes from the patch to
sysdeps/unix/sysv/linux/i386/makecontext.S solved the problem at least here. 
glibc-2.7-r2 on x86

------- Comment #13 From Alin Năstac 2008-05-19 19:24:37 0000 -------
Reassigned to toolchain team.

------- Comment #14 From ammar wk 2008-05-22 06:54:25 0000 -------
is it already in glibc patchset, right now ?

------- Comment #15 From Ruediger Gad 2008-06-12 21:20:25 0000 -------
Updated to sys-libs/glibc-2.8_p20080602 today.
Problem doesn't occur anymore with this glibc version.

------- Comment #16 From Mark Loeser 2009-04-20 21:42:23 0000 -------
Fixed in the newer versions of glibc, thanks for reporting.

First Last Prev Next    No search results available      Search page      Enter new bug