Bug 2460 - wall doesn\'t send msgs
: wall doesn\'t send msgs
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/SysVinit)
: unstable
: all Linux
: P1 blocker
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2003-04-01 23:36 by
Modified: 2003-08-25 15:18 (History)


Attachments
0002460-sysvinit-2.84-rh-alt.imz-wall-tty.patch (1.85 KB, application/octet-stream)
2003-04-03 21:57, imz
no flags Details
0002460-SysVinit-2.84-alt6.imz1.src.rpm (99.97 KB, application/x-rpm)
2003-04-03 21:58, imz
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2003-04-01 23:36:13
Although mesg is y, neither the sender, not some other users working in
different terminals (xterms and linux VCs) do not receive the messages, sent
like this:

wall hi

No errors are reported.
---
mesg y
wall hi
---
$ rpm -qf $(which wall)
SysVinit-2.84-alt6
------- Comment #1 From 2003-04-01 23:54:13 -------
Does w(1) reports something about those users who do not receive messages from
wall(1)?
If yes, are their \"tty\" parameters valid?
If yes, could you try to debug the change made in
sysvinit-2.84-rh-alt-wall-tty.patch?
------- Comment #2 From 2003-04-01 23:54:13 -------
Does w(1) reports something about those users who do not receive messages from
wall(1)?
If yes, are their \"tty\" parameters valid?
If yes, could you try to debug the change made in
sysvinit-2.84-rh-alt-wall-tty.patch?
------- Comment #3 From 2003-04-02 21:23:34 -------
Today it works.

But that was not a joke. Yesterday `wall\' absolutly didn\'t work. It produced nothing.
------- Comment #4 From 2003-04-02 21:23:34 -------
Today it works.

But that was not a joke. Yesterday `wall\' absolutly didn\'t work. It produced nothing.
------- Comment #5 From 2003-04-02 21:30:50 -------
Here are the log scripts for these calls. Nothing interesting. All those that
were made on 1st April did not work, those made on 2nd April did work.

# find /var/log -type f | xargs fgrep wall 
/var/log/auth/all:Apr  1 23:36:21 arrakis sudo:     ivan : TTY=pts/7 ;
PWD=/data/ivan ; USER=root ; COMMAND=/usr/bin/wall hi
/var/log/auth/secure:Apr  1 23:36:21 arrakis sudo:     ivan : TTY=pts/7 ;
PWD=/data/ivan ; USER=root ; COMMAND=/usr/bin/wall hi
/var/log/user/info:Apr  1 22:45:06 arrakis wall[3837]: wall: user ivan
broadcasted 1 lines (6 chars)
/var/log/user/info:Apr  1 22:45:18 arrakis wall[3861]: wall: user ivan
broadcasted 1 lines (6 chars)
/var/log/user/info:Apr  1 22:45:22 arrakis wall[3865]: wall: user ivan
broadcasted 1 lines (4 chars)
/var/log/user/info:Apr  1 22:47:35 arrakis wall[3968]: wall: user ivan
broadcasted 1 lines (4 chars)
/var/log/user/info:Apr  1 23:36:19 arrakis wall[5665]: wall: user ivan
broadcasted 1 lines (4 chars)
/var/log/user/info:Apr  1 23:36:21 arrakis wall[5668]: wall: user root
broadcasted 1 lines (4 chars)
/var/log/user/info:Apr  1 23:36:29 arrakis wall[5704]: wall: user root
broadcasted 1 lines (4 chars)
/var/log/user/info:Apr  1 23:45:00 arrakis wall[6079]: wall: user ivan
broadcasted 1 lines (9 chars)
/var/log/user/info:Apr  2 21:21:21 arrakis wall[4794]: wall: user ivan
broadcasted 1 lines (4 chars)
/var/log/user/info:Apr  2 21:23:32 arrakis wall[4974]: wall: user ivan
broadcasted 1 lines (5 chars)
/var/log/user/info:Apr  2 21:24:00 arrakis wall[4992]: wall: user ivan
broadcasted 1 lines (7 chars)
/var/log/user/info:Apr  2 21:26:18 arrakis wall[5065]: wall: user z broadcasted
1 lines (6 chars)
/var/log/rpmpkgs:rwall-0.17-ipl7mdk.i586.rpm
/var/log/security/suid_group.yesterday:/usr/bin/wall
/var/log/security/suid_group.today:/usr/bin/wall
/var/log/syslog/messages:Apr  1 22:45:06 arrakis wall[3837]: wall: user ivan
broadcasted 1 lines (6 chars)
/var/log/syslog/messages:Apr  1 22:45:18 arrakis wall[3861]: wall: user ivan
broadcasted 1 lines (6 chars)
/var/log/syslog/messages:Apr  1 22:45:22 arrakis wall[3865]: wall: user ivan
broadcasted 1 lines (4 chars)
/var/log/syslog/messages:Apr  1 22:47:35 arrakis wall[3968]: wall: user ivan
broadcasted 1 lines (4 chars)
/var/log/syslog/messages:Apr  1 23:36:19 arrakis wall[5665]: wall: user ivan
broadcasted 1 lines (4 chars)
/var/log/syslog/messages:Apr  1 23:36:21 arrakis wall[5668]: wall: user root
broadcasted 1 lines (4 chars)
/var/log/syslog/messages:Apr  1 23:36:29 arrakis wall[5704]: wall: user root
broadcasted 1 lines (4 chars)
/var/log/syslog/messages:Apr  1 23:45:00 arrakis wall[6079]: wall: user ivan
broadcasted 1 lines (9 chars)
/var/log/syslog/messages:Apr  2 21:21:21 arrakis wall[4794]: wall: user ivan
broadcasted 1 lines (4 chars)
/var/log/syslog/messages:Apr  2 21:23:32 arrakis wall[4974]: wall: user ivan
broadcasted 1 lines (5 chars)
/var/log/syslog/messages:Apr  2 21:24:00 arrakis wall[4992]: wall: user ivan
broadcasted 1 lines (7 chars)
/var/log/syslog/messages:Apr  2 21:26:18 arrakis wall[5065]: wall: user z
broadcasted 1 lines (6 chars)
------- Comment #6 From 2003-04-02 21:30:50 -------
Here are the log scripts for these calls. Nothing interesting. All those that
were made on 1st April did not work, those made on 2nd April did work.

# find /var/log -type f | xargs fgrep wall 
/var/log/auth/all:Apr  1 23:36:21 arrakis sudo:     ivan : TTY=pts/7 ;
PWD=/data/ivan ; USER=root ; COMMAND=/usr/bin/wall hi
/var/log/auth/secure:Apr  1 23:36:21 arrakis sudo:     ivan : TTY=pts/7 ;
PWD=/data/ivan ; USER=root ; COMMAND=/usr/bin/wall hi
/var/log/user/info:Apr  1 22:45:06 arrakis wall[3837]: wall: user ivan
broadcasted 1 lines (6 chars)
/var/log/user/info:Apr  1 22:45:18 arrakis wall[3861]: wall: user ivan
broadcasted 1 lines (6 chars)
/var/log/user/info:Apr  1 22:45:22 arrakis wall[3865]: wall: user ivan
broadcasted 1 lines (4 chars)
/var/log/user/info:Apr  1 22:47:35 arrakis wall[3968]: wall: user ivan
broadcasted 1 lines (4 chars)
/var/log/user/info:Apr  1 23:36:19 arrakis wall[5665]: wall: user ivan
broadcasted 1 lines (4 chars)
/var/log/user/info:Apr  1 23:36:21 arrakis wall[5668]: wall: user root
broadcasted 1 lines (4 chars)
/var/log/user/info:Apr  1 23:36:29 arrakis wall[5704]: wall: user root
broadcasted 1 lines (4 chars)
/var/log/user/info:Apr  1 23:45:00 arrakis wall[6079]: wall: user ivan
broadcasted 1 lines (9 chars)
/var/log/user/info:Apr  2 21:21:21 arrakis wall[4794]: wall: user ivan
broadcasted 1 lines (4 chars)
/var/log/user/info:Apr  2 21:23:32 arrakis wall[4974]: wall: user ivan
broadcasted 1 lines (5 chars)
/var/log/user/info:Apr  2 21:24:00 arrakis wall[4992]: wall: user ivan
broadcasted 1 lines (7 chars)
/var/log/user/info:Apr  2 21:26:18 arrakis wall[5065]: wall: user z broadcasted
1 lines (6 chars)
/var/log/rpmpkgs:rwall-0.17-ipl7mdk.i586.rpm
/var/log/security/suid_group.yesterday:/usr/bin/wall
/var/log/security/suid_group.today:/usr/bin/wall
/var/log/syslog/messages:Apr  1 22:45:06 arrakis wall[3837]: wall: user ivan
broadcasted 1 lines (6 chars)
/var/log/syslog/messages:Apr  1 22:45:18 arrakis wall[3861]: wall: user ivan
broadcasted 1 lines (6 chars)
/var/log/syslog/messages:Apr  1 22:45:22 arrakis wall[3865]: wall: user ivan
broadcasted 1 lines (4 chars)
/var/log/syslog/messages:Apr  1 22:47:35 arrakis wall[3968]: wall: user ivan
broadcasted 1 lines (4 chars)
/var/log/syslog/messages:Apr  1 23:36:19 arrakis wall[5665]: wall: user ivan
broadcasted 1 lines (4 chars)
/var/log/syslog/messages:Apr  1 23:36:21 arrakis wall[5668]: wall: user root
broadcasted 1 lines (4 chars)
/var/log/syslog/messages:Apr  1 23:36:29 arrakis wall[5704]: wall: user root
broadcasted 1 lines (4 chars)
/var/log/syslog/messages:Apr  1 23:45:00 arrakis wall[6079]: wall: user ivan
broadcasted 1 lines (9 chars)
/var/log/syslog/messages:Apr  2 21:21:21 arrakis wall[4794]: wall: user ivan
broadcasted 1 lines (4 chars)
/var/log/syslog/messages:Apr  2 21:23:32 arrakis wall[4974]: wall: user ivan
broadcasted 1 lines (5 chars)
/var/log/syslog/messages:Apr  2 21:24:00 arrakis wall[4992]: wall: user ivan
broadcasted 1 lines (7 chars)
/var/log/syslog/messages:Apr  2 21:26:18 arrakis wall[5065]: wall: user z
broadcasted 1 lines (6 chars)
------- Comment #7 From 2003-04-03 20:28:19 -------
It doesn\'t work again. :-(

`w\' shows those users, tty are valid. `cat\' to the corresponding tty-devices by the receiver works.

Will look at the patch.
------- Comment #8 From 2003-04-03 20:28:19 -------
It doesn\'t work again. :-(

`w\' shows those users, tty are valid. `cat\' to the corresponding tty-devices by the receiver works.

Will look at the patch.
------- Comment #9 From 2003-04-03 22:02:13 -------
It got an fd == 0, and thought this is a failure. With the modified attached
patch it works. I wonder, why yesterday open() didn\'t return 0. Perhaps there
are other places where 0 is considered to be a bad fd.

Used to work like this:

# strace -fF -e trace=open,close wall hi
open(\"/etc/ld.so.preload\", O_RDONLY)    = 3
close(3)                                = 0
open(\"/etc/ld.so.cache\", O_RDONLY)      = 3
close(3)                                = 0
open(\"/lib/i686/libc.so.6\", O_RDONLY)   = 3
close(3)                                = 0
close(3)                                = 0
open(\"/etc/nsswitch.conf\", O_RDONLY)    = 3
close(3)                                = 0
open(\"/etc/ld.so.cache\", O_RDONLY)      = 3
close(3)                                = 0
open(\"/lib/libnss_files.so.2\", O_RDONLY) = 3
close(3)                                = 0
open(\"/etc/passwd\", O_RDONLY)           = 3
close(3)                                = 0
open(\"/etc/localtime\", O_RDONLY)        = 3
close(3)                                = 0
close(3)                                = 0
open(\"/var/run/utmp\", O_RDWR)           = 3
open(\"/etc/passwd\", O_RDONLY)           = 4
close(4)                                = 0
close(0)                                = 0
open(\"/dev/pts/0\", O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
close(0)                                = 0
open(\"/dev/pts/2\", O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
close(0)                                = 0
open(\"/dev/pts/1\", O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
close(0)                                = 0
open(\"/dev/pts/4\", O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
close(0)                                = 0
open(\"/dev/pts/5\", O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
close(0)                                = 0
open(\"/dev/pts/6\", O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
close(0)                                = 0
open(\"/dev/pts/1\", O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
close(0)                                = 0
close(3)                                = 0

Now:

# strace -fF -e trace=open,close wall hi
open(\"/etc/ld.so.preload\", O_RDONLY)    = 3
close(3)                                = 0
open(\"/etc/ld.so.cache\", O_RDONLY)      = 3
close(3)                                = 0
open(\"/lib/i686/libc.so.6\", O_RDONLY)   = 3
close(3)                                = 0
close(3)                                = 0
open(\"/etc/nsswitch.conf\", O_RDONLY)    = 3
close(3)                                = 0
open(\"/etc/ld.so.cache\", O_RDONLY)      = 3
close(3)                                = 0
open(\"/lib/libnss_files.so.2\", O_RDONLY) = 3
close(3)                                = 0
open(\"/etc/passwd\", O_RDONLY)           = 3
close(3)                                = 0
open(\"/etc/localtime\", O_RDONLY)        = 3
close(3)                                = 0
close(3)                                = 0
open(\"/var/run/utmp\", O_RDWR)           = 3
open(\"/etc/passwd\", O_RDONLY)           = 4
close(4)                                = 0
[pid 19816] close(0)                    = 0
[pid 19816] open(\"/dev/pts/0\",
O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
[pid 19816] close(0)                    = 0
[pid 19816] open(\"/dev/pts/2\",
O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
[pid 19816] close(0)                    = 0
[pid 19816] open(\"/dev/pts/1\",
O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0

Broadcast message from root (pts/1) (Thu Apr  3 21:57:44 2003):

hi
[pid 19816] close(0)                    = 0
[pid 19816] open(\"/dev/pts/4\",
O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
[pid 19816] close(0)                    = 0
[pid 19816] open(\"/dev/pts/5\",
O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
[pid 19816] close(0)                    = 0
[pid 19816] open(\"/dev/pts/6\",
O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
[pid 19816] close(0)                    = 0
[pid 19816] open(\"/dev/pts/1\",
O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0

Broadcast message from root (pts/1) (Thu Apr  3 21:57:44 2003):

hi
close(0)                                = 0
close(3)                                = 0
------- Comment #10 From 2003-04-03 22:02:13 -------
It got an fd == 0, and thought this is a failure. With the modified attached
patch it works. I wonder, why yesterday open() didn\'t return 0. Perhaps there
are other places where 0 is considered to be a bad fd.

Used to work like this:

# strace -fF -e trace=open,close wall hi
open(\"/etc/ld.so.preload\", O_RDONLY)    = 3
close(3)                                = 0
open(\"/etc/ld.so.cache\", O_RDONLY)      = 3
close(3)                                = 0
open(\"/lib/i686/libc.so.6\", O_RDONLY)   = 3
close(3)                                = 0
close(3)                                = 0
open(\"/etc/nsswitch.conf\", O_RDONLY)    = 3
close(3)                                = 0
open(\"/etc/ld.so.cache\", O_RDONLY)      = 3
close(3)                                = 0
open(\"/lib/libnss_files.so.2\", O_RDONLY) = 3
close(3)                                = 0
open(\"/etc/passwd\", O_RDONLY)           = 3
close(3)                                = 0
open(\"/etc/localtime\", O_RDONLY)        = 3
close(3)                                = 0
close(3)                                = 0
open(\"/var/run/utmp\", O_RDWR)           = 3
open(\"/etc/passwd\", O_RDONLY)           = 4
close(4)                                = 0
close(0)                                = 0
open(\"/dev/pts/0\", O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
close(0)                                = 0
open(\"/dev/pts/2\", O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
close(0)                                = 0
open(\"/dev/pts/1\", O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
close(0)                                = 0
open(\"/dev/pts/4\", O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
close(0)                                = 0
open(\"/dev/pts/5\", O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
close(0)                                = 0
open(\"/dev/pts/6\", O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
close(0)                                = 0
open(\"/dev/pts/1\", O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
close(0)                                = 0
close(3)                                = 0

Now:

# strace -fF -e trace=open,close wall hi
open(\"/etc/ld.so.preload\", O_RDONLY)    = 3
close(3)                                = 0
open(\"/etc/ld.so.cache\", O_RDONLY)      = 3
close(3)                                = 0
open(\"/lib/i686/libc.so.6\", O_RDONLY)   = 3
close(3)                                = 0
close(3)                                = 0
open(\"/etc/nsswitch.conf\", O_RDONLY)    = 3
close(3)                                = 0
open(\"/etc/ld.so.cache\", O_RDONLY)      = 3
close(3)                                = 0
open(\"/lib/libnss_files.so.2\", O_RDONLY) = 3
close(3)                                = 0
open(\"/etc/passwd\", O_RDONLY)           = 3
close(3)                                = 0
open(\"/etc/localtime\", O_RDONLY)        = 3
close(3)                                = 0
close(3)                                = 0
open(\"/var/run/utmp\", O_RDWR)           = 3
open(\"/etc/passwd\", O_RDONLY)           = 4
close(4)                                = 0
[pid 19816] close(0)                    = 0
[pid 19816] open(\"/dev/pts/0\",
O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
[pid 19816] close(0)                    = 0
[pid 19816] open(\"/dev/pts/2\",
O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
[pid 19816] close(0)                    = 0
[pid 19816] open(\"/dev/pts/1\",
O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0

Broadcast message from root (pts/1) (Thu Apr  3 21:57:44 2003):

hi
[pid 19816] close(0)                    = 0
[pid 19816] open(\"/dev/pts/4\",
O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
[pid 19816] close(0)                    = 0
[pid 19816] open(\"/dev/pts/5\",
O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
[pid 19816] close(0)                    = 0
[pid 19816] open(\"/dev/pts/6\",
O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0
[pid 19816] close(0)                    = 0
[pid 19816] open(\"/dev/pts/1\",
O_WRONLY|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW) = 0

Broadcast message from root (pts/1) (Thu Apr  3 21:57:44 2003):

hi
close(0)                                = 0
close(3)                                = 0
------- Comment #11 From 2003-04-03 22:07:56 -------
My bad, it\'s native sysvinit bug which I had to fix myself.
Thanks a lot.
------- Comment #12 From 2003-04-03 22:07:56 -------
My bad, it\'s native sysvinit bug which I had to fix myself.
Thanks a lot.
------- Comment #13 From 2003-04-03 22:09:51 -------
Perhaps, it was a delibarate decision to take only fd > 0. In order not
write to the terminal of the sender. But as it can be seen from the strace
logs, 0 is closed before something is written. Maybe this is the place where
something should be fixed. (But the man-page says nothing about such a smart
behaviour.)

If so, the statement

        if (fd >= 0) close(fd);

in dowall.c will also break this smart behaviour.
------- Comment #14 From 2003-04-03 22:09:51 -------
Perhaps, it was a delibarate decision to take only fd > 0. In order not
write to the terminal of the sender. But as it can be seen from the strace
logs, 0 is closed before something is written. Maybe this is the place where
something should be fixed. (But the man-page says nothing about such a smart
behaviour.)

If so, the statement

        if (fd >= 0) close(fd);

in dowall.c will also break this smart behaviour.
------- Comment #15 From 2003-04-04 16:18:44 -------
There seems to be alarm handling error also.

Fixed in SysVinit-2.84-alt7; please check.
------- Comment #16 From 2003-04-04 16:18:44 -------
There seems to be alarm handling error also.

Fixed in SysVinit-2.84-alt7; please check.
------- Comment #17 From 2003-04-13 12:50:01 -------
Seems to work.

Somehow now it sends only 1 message to the terminal where `sudo su -\' is run; and used to send the message 2 times.
------- Comment #18 From 2003-04-13 12:50:01 -------
Seems to work.

Somehow now it sends only 1 message to the terminal where `sudo su -\' is run; and used to send the message 2 times.