Crash when using ulimit -n

2021-11-21 Thread balasr
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong 
-funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection 
-Werror=return-type -flto=auto -g  -D_GNU_SOURCE -DRECYCLES_PIDS -Wall -g 
-Wuninitialized -Wextra -Wno-switch-enum -Wno-unused-variable 
-Wno-unused-parameter -Wno-parentheses -ftree-loop-linear -pipe -DBNC382214=0 
-DIMPORT_FUNCTIONS_DEF=0
uname output: Linux sandkasten 5.14.11-2-default #1 SMP Sun Oct 10 08:34:34 UTC 
2021 (834) x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-suse-linux-gnu

Bash Version: 5.1
Patch Level: 8
Release Status: release

Description:
    Calling ulimit -n 1024 results in the message "Warning: Program '/bin/bash' 
crashed." and bash locks up.

Repeat-By:
    1. Open bash
    2. Enter `ulimit -n 1024'


I alwso generated a stacktrace:

Program received signal SIGSEGV, Segmentation fault.
0x5558c062in string_to_rlimtype(s=0x5591b570 "1024") at 
/usr/src/debug/bash-5.1.8-2.1.x86_64/general.c:189
Downloading source file /usr/src/debug/bash-5.1.8-2.1.x86_64/general.c...
189   for( ; s && *s && DIGIT (*s); s++)
Missing separate debuginfos, use: zypper install bash-debuginfo-5.1.8-2.1.x86_64
(gdb) bt
#0  0x5558c062in string_to_rlimtype(s=0x5591b570 "1024") at 
/usr/src/debug/bash-5.1.8-2.1.x86_64/general.c:189
#1  0x55617f6bin ulimit_internal(multiple=, 
mode=, cmdarg=0x5591b570 "1024", cmd=) at 
builtins/./ulimit.def:475
#2  ulimit_builtin(list=) at builtins/./ulimit.def:432
#3  0x5559e4f3in execute_builtin(builtin=0x55617760 
, words=0x556bac90, flags=0, subshell=0) at 
/usr/src/debug/bash-5.1.8-2.1.x86_64/execute_cmd.c:4828 

#4  0x55596973in execute_builtin_or_function(flags=0, 
fds_to_close=0x5591b500, redirects=, var=0x0, 
builtin=0x55617760 , words=0x556bac90) at 
/usr/src/debug/bash-5.1.8-2.1.x86_64/execute_cmd.c:5341
#5  execute_simple_command(simple_command=, pipe_in=-1, 
pipe_out=-1, async=0, fds_to_close=0x5591b500) at 
/usr/src/debug/bash-5.1.8-2.1.x86_64/execute_cmd.c:4597 

#6  0x55597cf3in execute_command_internal(command=0x5591b420, 
asynchronous=, pipe_in=-1, pipe_out=-1, 
fds_to_close=0x5591b500) at 
/usr/src/debug/bash-5.1.8-2.1.x86_64/execute_cmd.c:845
#7  0x5559a319in execute_command(command=0x5591b420) at 
/usr/src/debug/bash-5.1.8-2.1.x86_64/execute_cmd.c:395
#8  0x5558a365in reader_loop() at 
/usr/src/debug/bash-5.1.8-2.1.x86_64/eval.c:170
#9  0x5557a46ain main(argc=1, argv=0x7fffd978, env=0x7fffd988) 
at /usr/src/debug/bash-5.1.8-2.1.x86_64/shell.c:813


Regards
Robert


Re: Crash when using ulimit -n

2021-11-22 Thread balasr
Thanks for trying

It seems hibernation was the problem. I did a fresh reboot and the problem went 
 away.

On 22/11/2021 15:05, Chet Ramey wrote:
> On 11/21/21 8:34 PM, balasr wrote:
>
>> Bash Version: 5.1
>> Patch Level: 8
>> Release Status: release
>>
>> Description:
>>     Calling ulimit -n 1024 results in the message "Warning: Program 
>> '/bin/bash' crashed." and bash locks up.
>>
>> Repeat-By:
>>     1. Open bash
>>     2. Enter `ulimit -n 1024'
> Sorry, I can't reproduce this.
>
>