usblogin does not launch

Bug #560405 reported by Michael R.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
usbconsole
Triaged
High
Martin von Wittich

Bug Description

syslog says
Apr 10 17:34:23 zafir getty[4838]: ^M getty:Usage:^I [options] line [speed [term [lined]]]^M

Revision history for this message
Michael R. (michael-insulin-pumpers) wrote :
Download full text (3.6 KiB)

fyi

Linux zafir 2.6.29.6-smp #2 SMP Mon Aug 17 00:52:54 CDT 2009 i686 Intel(R) Atom(TM) CPU 230 @ 1.60GHz GenuineIntel GNU/Linux

slackware-version:Slackware 13.0.0.0.0

This is perl, v5.10.0 built for i486-linux-thread-multi

...and when you unplug the usb cable from the linux box

Apr 10 19:03:11 zafir kernel: BUG: unable to handle kernel NULL pointer dereference at (null)
Apr 10 19:03:11 zafir kernel: IP: [<c07a7238>] _spin_lock_irqsave+0x8/0x20
Apr 10 19:03:11 zafir kernel: *pde = 00000000
Apr 10 19:03:11 zafir kernel: Oops: 0002 [#1] SMP
Apr 10 19:03:11 zafir kernel: last sysfs file: /sys/devices/pci0000:00/0000:00:04.0/usb2/2-6/2-6:1.0/ttyUSB0/tty/ttyUSB0/dev
Apr 10 19:03:11 zafir kernel: Modules linked in: pl2303 usbserial snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss ipv6 pcmcia pcmcia_core agpgart ppdev lp parport_pc parport fuse snd_hda_codec_nvhdmi snd_hda_codec_realtek snd_hda_intel snd_hda_codec rfkill snd_hwdep snd_pcm snd_timer snd thermal rtc_cmos rtc_core led_class soundcore psmouse rtc_lib processor thermal_sys hwmon wmi button sg snd_page_alloc serio_raw shpchp evdev forcedeth [last unloaded: pcmcia_core]
Apr 10 19:03:11 zafir kernel:
Apr 10 19:03:11 zafir kernel: Pid: 1180, comm: screen Not tainted (2.6.29.6-smp #2) Aspire R1600
Apr 10 19:03:11 zafir kernel: EIP: 0060:[<c07a7238>] EFLAGS: 00010046 CPU: 0
Apr 10 19:03:11 zafir kernel: EIP is at _spin_lock_irqsave+0x8/0x20
Apr 10 19:03:11 zafir kernel: EAX: 00000000 EBX: f84f5ca0 ECX: 00000100 EDX: 00000246
Apr 10 19:03:11 zafir kernel: ESI: 00000000 EDI: f2ebb254 EBP: f2ebb200 ESP: d7e15e4c
Apr 10 19:03:11 zafir kernel: DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Apr 10 19:03:11 zafir kernel: Process screen (pid: 1180, ti=d7e14000 task=cff26d80 task.ti=d7e14000)
Apr 10 19:03:11 zafir kernel: Stack:
Apr 10 19:03:11 zafir kernel: f84f3bb7 d7e15e80 c019d5ae d7e15e68 bfd97994 d7e15e68 cfda8000 00000050
Apr 10 19:03:11 zafir kernel: 00000000 00000000 00000040 00000000 00000000 f84f5ca0 f2ebb200 f2ebb254
Apr 10 19:03:11 zafir kernel: e7759120 f84e5ee5 c019a656 ffffffff ffffffff cfda8000 e77fe900 cfda8000
Apr 10 19:03:11 zafir kernel: Call Trace:
Apr 10 19:03:11 zafir kernel: [<f84f3bb7>] pl2303_close+0x27/0x220 [pl2303]
Apr 10 19:03:11 zafir kernel: [<c019d5ae>] core_sys_select+0x24e/0x2f0
Apr 10 19:03:11 zafir kernel: [<f84e5ee5>] serial_close+0x165/0x1a0 [usbserial]
Apr 10 19:03:11 zafir kernel: [<c019a656>] fasync_helper+0x26/0x100
Apr 10 19:03:11 zafir kernel: [<c041f9de>] tty_fasync+0x3e/0x110
Apr 10 19:03:11 zafir kernel: [<c0421fc0>] tty_release_dev+0x160/0x500
Apr 10 19:03:11 zafir kernel: [<c013d923>] remove_wait_queue+0x13/0x40
Apr 10 19:03:11 zafir kernel: [<c0424126>] n_tty_read+0x306/0x720
Apr 10 19:03:11 zafir kernel: [<c0191180>] base_probe+0x10/0x40
Apr 10 19:03:11 zafir kernel: [<c012053e>] __wake_up+0x3e/0x60
Apr 10 19:03:11 zafir kernel: [<c042236f>] tty_release+0xf/0x20
Apr 10 19:03:11 zafir kernel: [<c018f8df>] __fput+0x9f/0x1a0
Apr 10 19:03:11 zafir kernel: [<c018c6d7>] filp_close+0x47/0x80
Apr 10 19:03:11 zafir kernel: [<c018c785>] sys_close+0x75/0xc0
Apr 10 19:03:11 zafir kernel: [<...

Read more...

Revision history for this message
Michael R. (michael-insulin-pumpers) wrote :

have a different getty with cmd line opts of

 /sbin/getty [-d defaults_file ] [-C connect_script ] [-D debug_value ] [-R] [-a] [-h] [-r delay ] [-t timeout ] [-w waitfor ] port [speed [type [lined]]]

changed the line in usbconsole to read

my @getty = ("/sbin/getty", "-t", "120", $device, "115200", "linux");

Still no luck. Getty is just respawned over and over.

Revision history for this message
Michael R. (michael-insulin-pumpers) wrote :

Ok, solved.....

Your "getty" string is not really for getty, it is for "agetty" which is the default getty on some distro's

It would help if you would make that clear, either that or provide the getty strings for standard getty, mgetty, etc.

BTW, now that I am calling the correct getty (agetty) everything works slick.

Thanks for a nice piece of perl.

Michael

Revision history for this message
Martin von Wittich (martin.von.wittich) wrote :

Hi Michael,

you're right, I wrote this on a Debian system and Debian is using agetty. Until now I wasn't really aware of the fact that there could be different getty's on different systems :-)
Unfortunately the binary on Debian is called "getty" and not "agetty" - there isn't even a link:

iserv ~ # LANG=C ll /sbin/{a,}getty
ls: cannot access /sbin/agetty: No such file or directory
-rwxr-xr-x 1 root root 15K 29. Apr 2008 /sbin/getty*

So the most elegant solution (check for either agetty or getty and use the respective options) does not seem to be possible. Ah, I guess I'll just check for Debian and then use agetty options and else fall back to the options you have posted; I hope that'll be supported on all getty's. Thanks for the bug report!

Revision history for this message
Michael R. (michael-insulin-pumpers) wrote : Re: [Bug 560405] Re: usblogin does not launch

> Hi Michael,
>
> you're right, I wrote this on a Debian system and Debian is using
> agetty. Until now I wasn't really aware of the fact that there could
> be different getty's on different systems :-) Unfortunately the binary
> on Debian is called "getty" and not "agetty" - there isn't even a
> link:
>
> iserv ~ # LANG=C ll /sbin/{a,}getty
> ls: cannot access /sbin/agetty: No such file or directory
> -rwxr-xr-x 1 root root 15K 29. Apr 2008 /sbin/getty*
>
> So the most elegant solution (check for either agetty or getty and use
> the respective options) does not seem to be possible. Ah, I guess I'll
> just check for Debian and then use agetty options and else fall back
> to the options you have posted; I hope that'll be supported on all
> getty's. Thanks for the bug report!
>
> --

how about checking the string that comes out of "getty -v". It will
be unique for the particular kind(s) of getty(s) that is/are found on
the target system. You can use grep, sed, awk, whatever to look for a
particular option string that marks that getty as unique and having
the options you need in your script.

getty, mgetty, agetty

Cheers,
Michael

> usblogin does not launch
> https://bugs.launchpad.net/bugs/560405
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in usbconsole: New
>
> Bug description:
> syslog says
> Apr 10 17:34:23 zafir getty[4838]: ^M getty:Usage:^I [options] line
> [speed [term [lined]]]^M
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/usbconsole/+bug/560405/+subscribe

Changed in usbconsole:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Martin von Wittich (martin.von.wittich)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.