[BusyBox 0003264]: less ends in last_modifying_cmd overrun
bugs at busybox.net
bugs at busybox.net
Fri May 9 11:12:28 UTC 2008
A NOTE has been added to this issue.
======================================================================
http://busybox.net/bugs/view.php?id=3264
======================================================================
Reported By: Reiner
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 3264
Category: Other
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
======================================================================
Date Submitted: 05-07-2008 03:55 PDT
Last Modified: 05-09-2008 04:12 PDT
======================================================================
Summary: less ends in last_modifying_cmd overrun
Description:
Hello,
I have the following problem:
less test.log --> ok
cat test.log | busybox less --> ok
cat test.log | less --> last_modifying_cmd overrun
After this call the shell isn't usable anymore.
I've tried this with busybox versions 1.9.1, 1.9.2 and 1.10.1.
All the same.
Any Idea what is going wrong?
Regards
Reiner
======================================================================
----------------------------------------------------------------------
vda - 05-07-08 05:22
----------------------------------------------------------------------
last_modifying_cmd is a static variable in vi.c, I have no idea what you
mean by
"cat test.log | less --> last_modifying_cmd overrun"
in this context. How cat, or less, can affect or be affected by
last_modifying_cmd?
----------------------------------------------------------------------
Reiner - 05-07-08 23:08
----------------------------------------------------------------------
when I try the following command on the console
cat test.log | less
it seems that less is started and tried to display the content of the file
test.log.
But it dosn't show the content. I only see the line "last_modifying_cmd
overrun" and I can not leave less again.
I do not know why busybox calls vi when I do this command.
----------------------------------------------------------------------
vda - 05-08-08 02:10
----------------------------------------------------------------------
Please run
cat test.log | strace -o less.log less
and show less.log contents
----------------------------------------------------------------------
Reiner - 05-08-08 03:41
----------------------------------------------------------------------
Here is the content:
This command is working and I can leave less.
==============================================
execve("/usr/bin/less", ["less"], [/* 11 vars */]) = 0
uname({sys="Linux", node="172.17.0.1", ...}) = 0
brk(0) = 0x10086000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x30015000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/tls/ppc8540/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file
or directory)
stat64("/lib/tls/ppc8540", 0x7fe191b0) = -1 ENOENT (No such file or
directory)
open("/lib/tls/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib/tls", 0x7fe191b0) = -1 ENOENT (No such file or
directory)
open("/lib/ppc8540/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib/ppc8540", 0x7fe191b0) = -1 ENOENT (No such file or
directory)
open("/lib/libcrypt.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\t"..., 512)
= 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=22156, ...}) = 0
mmap(0xffb3000, 246400, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xffb3000
mprotect(0xffb8000, 225920, PROT_NONE) = 0
mmap(0xffc7000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0xffc7000
mmap(0xffc9000, 156288, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffc9000
close(3) = 0
open("/lib/libm.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0VP"..., 512)
= 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=673260, ...}) = 0
mmap(0xfef0000, 732656, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xfef0000
mprotect(0xff92000, 69104, PROT_NONE) = 0
mmap(0xffa1000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa1000) = 0xffa1000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1\311"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1160332, ...}) = 0
mmap(0xfdc8000, 1145852, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0xfdc8000
mmap(0xfed8000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x110000) = 0xfed8000
mmap(0xfede000, 7164, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xfede000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x30016000
mprotect(0xfed8000, 4096, PROT_READ) = 0
mprotect(0xffa1000, 4096, PROT_READ) = 0
mprotect(0xffc7000, 4096, PROT_READ) = 0
mprotect(0x30024000, 4096, PROT_READ) = 0
getuid() = 0
brk(0) = 0x10086000
brk(0x100a7000) = 0x100a7000
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
open("/dev/tty", O_RDONLY) = 3
ioctl(0, TCGETS, 0x7fe19930) = -1 EINVAL (Invalid argument)
ioctl(3, TIOCGWINSZ, {ws_row=51, ws_col=138, ws_xpixel=4096,
ws_ypixel=19080}) = 0
ioctl(3, TCGETS, {B38400 opost isig icanon echo ...}) = 0
rt_sigaction(SIGTERM, {0x1000bde4, [TERM], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {0x1000bde4, [INT], SA_RESTART}, {SIG_DFL}, 8) = 0
fcntl64(0, F_GETFL) = 0 (flags O_RDONLY)
fcntl64(0, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
read(0, "#clean\n\necho \"opcontrol --shutdo"..., 8193) = 62
fcntl64(0, F_GETFL) = 0x800 (flags
O_RDONLY|O_NONBLOCK)
fcntl64(0, F_SETFL, O_RDONLY) = 0
fcntl64(0, F_GETFL) = 0 (flags O_RDONLY)
fcntl64(0, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
read(0, "", 8193) = 0
fcntl64(0, F_GETFL) = 0x800 (flags
O_RDONLY|O_NONBLOCK)
fcntl64(0, F_SETFL, O_RDONLY) = 0
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 1), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x30017000
write(1, "\33[0;0H\33[K#clean\n", 16) = 16
write(1, "\33[K\n", 4) = 4
write(1, "\33[Kecho \"opcontrol --shutdown .."..., 35) = 35
write(1, "\33[Kopcontrol --shutdown\n", 24) = 24
write(1, "\33[K\n", 4) = 4
write(1, "\33[K\n", 4) = 4
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[K~\n", 5) = 5
write(1, "\33[51;0H\33[K\33[7mstandard input\33[0m", 32) = 32
ioctl(3, TCSETS, {B38400 opost isig -icanon -echo ...}) = 0
select(4, [3], NULL, NULL, NULL) = 1 (in [3])
fcntl64(3, F_GETFL) = 0 (flags O_RDONLY)
fcntl64(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
read(3, ":", 16) = 1
fcntl64(3, F_GETFL) = 0x800 (flags
O_RDONLY|O_NONBLOCK)
fcntl64(3, F_SETFL, O_RDONLY) = 0
ioctl(3, TCSETS, {B38400 opost isig icanon echo ...}) = 0
write(1, "\33[51;0H\33[K\33[7m :\33[0m", 20) = 20
ioctl(3, TCSETS, {B38400 opost isig -icanon -echo ...}) = 0
select(4, [3], NULL, NULL, NULL) = 1 (in [3])
fcntl64(3, F_GETFL) = 0 (flags O_RDONLY)
fcntl64(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
read(3, "q", 16) = 1
fcntl64(3, F_GETFL) = 0x800 (flags
O_RDONLY|O_NONBLOCK)
fcntl64(3, F_SETFL, O_RDONLY) = 0
ioctl(3, TCSETS, {B38400 opost isig icanon echo ...}) = 0
write(1, "\n", 1) = 1
munmap(0x30017000, 4096) = 0
exit_group(0) = ?
----------------------------------------------------------------------
vda - 05-08-08 07:00
----------------------------------------------------------------------
It is very weird that "strace command" is different from just "command". I
give up.
----------------------------------------------------------------------
Reiner - 05-09-08 00:44
----------------------------------------------------------------------
@vda, could you reproduce my problem?
----------------------------------------------------------------------
vda - 05-09-08 04:12
----------------------------------------------------------------------
No, it works for me. It seems that "less" is aliased to vi in your shell,
or something like that. You need to investigate.
I suppose "cat file | /full/path/to/less" works? If yes, you definitely
have shell alias problem.
Issue History
Date Modified Username Field Change
======================================================================
05-07-08 03:55 Reiner New Issue
05-07-08 03:55 Reiner Status new => assigned
05-07-08 03:55 Reiner Assigned To => BusyBox
05-07-08 03:57 Reiner Issue Monitored: Reiner
05-07-08 05:22 vda Note Added: 0007464
05-07-08 23:07 Reiner Note Added: 0007504
05-07-08 23:08 Reiner Note Edited: 0007504
05-08-08 02:10 vda Note Added: 0007514
05-08-08 03:41 Reiner Note Added: 0007524
05-08-08 07:00 vda Note Added: 0007534
05-09-08 00:44 Reiner Note Added: 0007554
05-09-08 04:12 vda Note Added: 0007574
======================================================================
More information about the busybox-cvs
mailing list