bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

runttys segfaulting


From: Ryan M. Golbeck
Subject: runttys segfaulting
Date: Mon, 19 Nov 2001 18:29:44 -0500
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i386-debian-linux-gnu)

rmgolbeck@uwaterloo.ca (Ryan M. Golbeck) writes (on debian-hurd): 

> rmgolbeck@uwaterloo.ca (Ryan M. Golbeck) writes (on debian-hurd):
>
>> I'm trying to get gnumach to start a login shell on the serial port.
>>
>> I have uncommented the line in /etc/ttys that reads:
>> com0   "/libexec/getty 9600"      dialup     on    secure
>>
>> On reboot, runsystem segfaulted with the following error:
>> /libexec/runsystem: line 140:      90 Segmentation fault    ${RUNTTYS}
>>
>> I have tried changing dialup to vt100 with the same results.  From
>> gnumach's startup messages, it appear as though my serial port at com0
>> is detected fine and the link works fine because grub is properly
>> putting itself onto the serial port during boot up.
>
> I have tried commenting out the console line in /etc/ttys (this idea
> is from a thread from about a year and a half back in this list), and
> it doesn't segfault but neither does it sent anything out onto the
> serial port.

Okay, well that's what I'm trying to do.

If I only have one terminal mentioned in /etc/ttys (no matter which
one) it works, so I can have a login shell on the serial port, or on
the console but not both at once or I will get the segmentation fault.

The backtrace of the segfault:

#0  0x010bc618 in free () from /lib/libc.so.0.2
#1  0x010bc31a in malloc () from /lib/libc.so.0.2
#2  0x010bbb53 in malloc () from /lib/libc.so.0.2
#3  0x010b63c8 in vasprintf () from /lib/libc.so.0.2
#4  0x010ae119 in asprintf () from /lib/libc.so.0.2
#5  0x08048eb6 in setup_terminal (t=0x804af50, tt=0x1190be0)
    at ../../../hurd/daemons/runttys.c:101
#6  0x08049013 in add_terminal (tt=0x1190be0)
    at ../../../hurd/daemons/runttys.c:129
#7  0x080490b6 in init_ttys () at ../../../hurd/daemons/runttys.c:157
#8  0x0804970a in main () at ../../../hurd/daemons/runttys.c:405
#9  0x0107220b in __libc_start_main () from /lib/libc.so.0.2


This this looked a little weird to me, I played around with it a bit.
The first pass over asprintf never segfaults.  The second pass, I
checked that all the arguments passed to it were in order (null
terminated, etc) and everything looked fine but it still segfaulted.

I tried replacing the asprint (line 101 of hurd/daemons/runttys.c) with
the following:

char *line = malloc(100);

sprintf( line, "%s %s", tt->ty_getty, tt->ty_name );


When I did this it segfaults at a different location, the backtrace is:

#0  0x010bc618 in free () from /lib/libc.so.0.2
#1  0x010bc31a in malloc () from /lib/libc.so.0.2
#2  0x010bbb53 in malloc () from /lib/libc.so.0.2
#3  0x08048eab in setup_terminal (t=0x804af50, tt=0x1190be0)
    at ../../../hurd/daemons/runttys.c:100
#4  0x0804901b in add_terminal (tt=0x1190be0)
    at ../../../hurd/daemons/runttys.c:130
#5  0x080490be in init_ttys () at ../../../hurd/daemons/runttys.c:158
#6  0x0804971a in main () at ../../../hurd/daemons/runttys.c:406
#7  0x0107220b in __libc_start_main () from /lib/libc.so.0.2


I have stepped through the code line by line and follow what it's doing
but I can't figure out what's going wrong up to the point where it starts
calling asprintf() or malloc().

-Ryan

-- 
Ryan Golbeck <rmgolbeck@uwaterloo.ca>
Computer Science
University Of Waterloo

GPG: 1024D/78916B84 
1B1B 2A87 3F00 A7FB 40F3  526D 36CF BA44 7891 6B84



reply via email to

[Prev in Thread] Current Thread [Next in Thread]