long delays when checking a maildir format mailbox
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: netbsdelf2.0 Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='netbsdelf2.0' -DCONF_MACHTYPE='i386-unknown-netbsdelf2.0' -DCONF_VENDOR='unknown' -DLOCALEDIR='/pkg/bash-3.0-p1/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -I/usr/local/include -Wl,-Map,/tmp/pipes/bash-3.0-p1 uname output: NetBSD panix5.panix.com 2.0 NetBSD 2.0 (PANIX-USER) #3: Thu Jan 13 20:20:38 EST 2005 [EMAIL PROTECTED]:/devel/netbsd/2.0/src/sys/arch/i386/compile/PANIX-USER i386 Machine Type: i386-unknown-netbsdelf2.0 Bash Version: 3.0 Patch Level: 0 Release Status: release Description: Our environment uses maildir format mailboxes. When a user has a large mailbox, bash takes a very long time (sometimes 60-120 seconds on a mailbox with 5000 messages in it) when doing the "new mail check". The more messages in the mailbox, the worse the problem gets. Repeat-By: With a large maildir mailbox of 2500 or more messages, set $MAIL appropriately and wait for a new message to come in. You will encounter long pauses between commands when Bash checks for new mail. ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
cannot fully disable checking of mail
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: netbsdelf3.0 Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='netbsdelf3.0' -DCONF_MACHTYPE='i386-unknown-netbsdelf3.0' -DCONF_VENDOR='unknown' -DLOCALEDIR='/pkg/bash-3.2/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -I./lib/intl -I/devel/build/NetBSD/bash/bash-3.2/lib/intl -Wl,-Map,/tmp/pipes/bash-3.2 uname output: NetBSD panix5.panix.com 3.1_RC3 NetBSD 3.1_RC3 (PANIX-35) #0: Wed Oct 18 22:28:22 EDT 2006 [EMAIL PROTECTED]:/devel/netbsd/3.1-RC3/src/sys/arch/i386/compile/PANIX-35 i386 Machine Type: i386-unknown-netbsdelf3.0 Bash Version: 3.2 Patch Level: 0 Release Status: release Description: Some of our customers have large inboxes in maildir format (thousands of messages). bash is very inefficient when used to check mail files this way, because it loops over the entire maildir/new and maildir/cur directories whenever it checks mail. We thus tried to turn off mail checking in /etc/profile. But code like this in /etc/profile: unset MAILCHECK MAIL=$HOME/.maildir/ still provokes a complete walk of the maildir directory (observed via ktrace). The culprit appears to be the mailstat() function, which is called whenever the value of MAIL is changed (from sv_mail): #0 0x080b05e1 in mailstat () #1 0x0807ff46 in update_mail_file () #2 0x0808018d in add_mail_file () #3 0x0808065b in remember_mail_dates () #4 0x08066cae in sv_mail () Repeat-By: set /etc/profile to "unset MAILCHECK; MAIL=/large/user/.maildir" $ ktrace bash -l bash> exit # show how many times maildir was referenced: $ kdump | grep -c /large/user/.maildir Fix: Don't ever call mailstat() if MAILCHECK is not set? ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
history lines can be deleted even with histreedit = off
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: netbsdelf3.0 Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='netbsdelf3.0' -DCONF_MACHTYPE='i386-unknown-netbsdelf3.0' -DCONF_VENDOR='unknown' -DLOCALEDIR='/pkg/bash-3.2/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -I./lib/intl -I/devel/build/NetBSD/bash/bash-3.2/lib/intl -Wl,-Map,/tmp/pipes/bash-3.2 uname output: NetBSD panix5.panix.com 3.1_RC3 NetBSD 3.1_RC3 (PANIX-35) #0: Wed Oct 18 22:28:22 EDT 2006 [EMAIL PROTECTED]:/devel/netbsd/3.1-RC3/src/sys/arch/i386/compile/PANIX-35 i386 Machine Type: i386-unknown-netbsdelf3.0 Bash Version: 3.2 Patch Level: 0 Release Status: release Description: Even with histreedit set to off (the default), bash allows the user to delete history lines if the user presses Control-U, and then uses Control-N or Control-P to move up or down in the history. Problem does not seem platform-specific since it also happens on our Linux boxes. Repeat-By: Enter bash in interactive mode. Confirm histredit is off. Type a few commands in. Use control-P a few times to scroll up in the command history. Press control-U, then Control-N a few times to scroll down back to the bottom. Then type in "history | tail". You will see a blank line with the "*" marked to show that you have just edited your history, as in the example below: $ ~/ [2] $ shopt histreedit histreedit off $ ~/ [2] $ history | tail 595 history | tail 596 pwd 597 history | tail 598 history | tail -20 599 one 600 two 601* 602 four 603 five 604 history | tail ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash