All of lore.kernel.org
 help / color / mirror / Atom feed
* 1480: "bad address" instead of "argument list too"
@ 2006-03-17 16:56 Martin Michlmayr
  2006-03-17 17:02 ` Ralf Baechle
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Michlmayr @ 2006-03-17 16:56 UTC (permalink / raw)
  To: linux-mips

I get the following in a directory which has many files in it on a
Braodcom 1480:

2179:tbm@bigsur: ~/build/logs] grep foo *
zsh: bad address: grep

Normally, I'd expect an "zsh: argument list too long: grep" error.

I get this with different shells.  Hmm, that's interesting.  "echo *"
works.  I assume shell built-in commands work but others don't.

Any idea?
-- 
Martin Michlmayr
http://www.cyrius.com/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 1480: "bad address" instead of "argument list too"
  2006-03-17 16:56 1480: "bad address" instead of "argument list too" Martin Michlmayr
@ 2006-03-17 17:02 ` Ralf Baechle
  2006-03-17 17:21   ` Martin Michlmayr
  0 siblings, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2006-03-17 17:02 UTC (permalink / raw)
  To: Martin Michlmayr; +Cc: linux-mips

On Fri, Mar 17, 2006 at 04:56:29PM +0000, Martin Michlmayr wrote:

> I get the following in a directory which has many files in it on a
> Braodcom 1480:
> 
> 2179:tbm@bigsur: ~/build/logs] grep foo *
> zsh: bad address: grep
> 
> Normally, I'd expect an "zsh: argument list too long: grep" error.
> 
> I get this with different shells.  Hmm, that's interesting.  "echo *"
> works.  I assume shell built-in commands work but others don't.

Chances are this is caused by the return value of some syscall.  Can you
use strace on a shell to isolate it?  Is this 32-bit software on a 64-bit
kernel?

  Ralf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 1480: "bad address" instead of "argument list too"
  2006-03-17 17:02 ` Ralf Baechle
@ 2006-03-17 17:21   ` Martin Michlmayr
  2006-03-17 17:35     ` Ralf Baechle
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Michlmayr @ 2006-03-17 17:21 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

* Ralf Baechle <ralf@linux-mips.org> [2006-03-17 17:02]:
> Chances are this is caused by the return value of some syscall.  Can you
> use strace on a shell to isolate it?

I tried, but I don't know how.  "strace echo *" immediately gives a
"bad address" because the wildcard is evaluated before strace is
invoked.  How can I call strace in this case?

> Is this 32-bit software on a 64-bit kernel?

Yes.
-- 
Martin Michlmayr
http://www.cyrius.com/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 1480: "bad address" instead of "argument list too"
  2006-03-17 17:21   ` Martin Michlmayr
@ 2006-03-17 17:35     ` Ralf Baechle
  2006-03-17 18:11       ` Martin Michlmayr
  0 siblings, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2006-03-17 17:35 UTC (permalink / raw)
  To: Martin Michlmayr; +Cc: linux-mips

On Fri, Mar 17, 2006 at 05:21:27PM +0000, Martin Michlmayr wrote:

> * Ralf Baechle <ralf@linux-mips.org> [2006-03-17 17:02]:
> > Chances are this is caused by the return value of some syscall.  Can you
> > use strace on a shell to isolate it?
> 
> I tried, but I don't know how.  "strace echo *" immediately gives a
> "bad address" because the wildcard is evaluated before strace is
> invoked.  How can I call strace in this case?

Log into a second shell from another tty, find out the PID of the first
shell.  Then do an strace -ff -v -p <PID of first shell> in the second
shell, go back to the first shell and do your echo *.  You now should
have the interesting bits of the log in the second window.

> > Is this 32-bit software on a 64-bit kernel?

There remain corner cases to be fixed in that emulation layer even though
it's good enough for general use since a long time.

  Ralf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 1480: "bad address" instead of "argument list too"
  2006-03-17 17:35     ` Ralf Baechle
@ 2006-03-17 18:11       ` Martin Michlmayr
  2006-03-17 18:38         ` Ralf Baechle
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Michlmayr @ 2006-03-17 18:11 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

[-- Attachment #1: Type: text/plain, Size: 447 bytes --]

* Ralf Baechle <ralf@linux-mips.org> [2006-03-17 17:35]:
> Log into a second shell from another tty, find out the PID of the first
> shell.  Then do an strace -ff -v -p <PID of first shell> in the second
> shell, go back to the first shell and do your echo *.  You now should
> have the interesting bits of the log in the second window.

Doh, I could've thought of that myself.  The strace is attached.
-- 
Martin Michlmayr
http://www.cyrius.com/

[-- Attachment #2: strace.bz2 --]
[-- Type: application/octet-stream, Size: 86761 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 1480: "bad address" instead of "argument list too"
  2006-03-17 18:11       ` Martin Michlmayr
@ 2006-03-17 18:38         ` Ralf Baechle
  0 siblings, 0 replies; 6+ messages in thread
From: Ralf Baechle @ 2006-03-17 18:38 UTC (permalink / raw)
  To: Martin Michlmayr; +Cc: linux-mips

On Fri, Mar 17, 2006 at 06:11:53PM +0000, Martin Michlmayr wrote:

> * Ralf Baechle <ralf@linux-mips.org> [2006-03-17 17:35]:
> > Log into a second shell from another tty, find out the PID of the first
> > shell.  Then do an strace -ff -v -p <PID of first shell> in the second
> > shell, go back to the first shell and do your echo *.  You now should
> > have the interesting bits of the log in the second window.
> 
> Doh, I could've thought of that myself.  The strace is attached.

No smoking gun in that trace, I'm afraid.

  Ralf

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-03-17 18:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-17 16:56 1480: "bad address" instead of "argument list too" Martin Michlmayr
2006-03-17 17:02 ` Ralf Baechle
2006-03-17 17:21   ` Martin Michlmayr
2006-03-17 17:35     ` Ralf Baechle
2006-03-17 18:11       ` Martin Michlmayr
2006-03-17 18:38         ` Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.