shell redirection magic broke boot in 1.1

Bug #739984 reported by Arkadiusz Miśkiewicz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upstart
Fix Released
Critical
Scott James Remnant

Bug Description

#619269 fix in 1.1 broke boot on my system.

It reports "/proc/self/fd/8[1]: <&8- : illegal file descriptor name" and that's all from booting process. It doesn't continue.

/bin/sh is pdksh here.

Revision history for this message
Johan Kiviniemi (ion) wrote :

Scott,

Shouldn’t

  NIH_ZERO (nih_io_printf (io, "exec <&%d-\n", fds[0]));

be

  NIH_ZERO (nih_io_printf (io, "exec %d<&-\n", fds[0]));

?

Changed in upstart:
status: New → Confirmed
Revision history for this message
Scott James Remnant (scott) wrote : Re: [Bug 739984] Re: shell redirection magic broke boot in 1.1

Yes, that looks almost certainly wrong; I guess dash + bash simply
don't care - I'll get this fixed and release a 1.2 bpb

2011/3/22 Johan Kiviniemi <email address hidden>:
> Scott,
>
> Shouldn’t
>
>  NIH_ZERO (nih_io_printf (io, "exec <&%d-\n", fds[0]));
>
> be
>
>
>  NIH_ZERO (nih_io_printf (io, "exec %d<&-\n", fds[0]));
>
> ?
>
> ** Changed in: upstart
>       Status: New => Confirmed
>
> --
> You received this bug notification because you are a member of Upstart
> Developers, which is subscribed to upstart .
> https://bugs.launchpad.net/bugs/739984
>
> Title:
>  shell redirection magic broke boot in 1.1
>
> Status in Upstart:
>  Confirmed
>
> Bug description:
>  #619269 fix in 1.1 broke boot on my system.
>
>  It reports "/proc/self/fd/8[1]: <&8- : illegal file descriptor name"
>  and that's all from booting process. It doesn't continue.
>
>  /bin/sh is pdksh here.
>

Changed in upstart:
status: Confirmed → Triaged
Changed in upstart:
status: Triaged → Fix Released
importance: Undecided → Critical
assignee: nobody → Scott James Remnant (scott)
milestone: none → 1.2
Revision history for this message
Johan Kiviniemi (ion) wrote :

In doesn’t seem to work in dash either. Seems like a bashism.

% dash -c 'exec <&9-; ls -l /proc/self/fd/9' 9<&1
dash: Syntax error: Bad fd number

% bash -c 'exec <&9-; ls -l /proc/self/fd/9' 9<&1
ls: cannot access /proc/self/fd/9: No such file or directory

% zsh -c 'exec <&9-; ls -l /proc/self/fd/9' 9<&1
zsh:1: file number expected

Revision history for this message
Scott James Remnant (scott) wrote :

Weird, I have no idea how "make check" passes then ;-)

Oh, yes I do ... /bin/sh is actually "bash" on Google machines - d'oh

2011/3/22 Johan Kiviniemi <email address hidden>:
> In doesn’t seem to work in dash either. Seems like a bashism.
>
> % dash -c 'exec <&9-; ls -l /proc/self/fd/9' 9<&1
> dash: Syntax error: Bad fd number
>
> % bash -c 'exec <&9-; ls -l /proc/self/fd/9' 9<&1
> ls: cannot access /proc/self/fd/9: No such file or directory
>
> % zsh -c 'exec <&9-; ls -l /proc/self/fd/9' 9<&1
> zsh:1: file number expected
>
> --
> You received this bug notification because you are a member of Upstart
> Developers, which is subscribed to upstart .
> https://bugs.launchpad.net/bugs/739984
>
> Title:
>  shell redirection magic broke boot in 1.1
>
> Status in Upstart:
>  Fix Released
>
> Bug description:
>  #619269 fix in 1.1 broke boot on my system.
>
>  It reports "/proc/self/fd/8[1]: <&8- : illegal file descriptor name"
>  and that's all from booting process. It doesn't continue.
>
>  /bin/sh is pdksh here.
>

Revision history for this message
Fiodor Kupchik (ferimy) wrote :

It seems I've run into this recently. I've tried to upgrade to ubuntu oneiric on OpenVZ VPS machine and after all the boot process became broken. The only thing I could see in the list of procs is

/bin/sh -e /proc/self/fd/9

and after all services start but not networking. Not sure this is it but very similar situation.

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.