Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.1.0 dumping core after upgrading from 3.0.2 #6597

Closed
caffeinejolt opened this issue Feb 13, 2020 · 3 comments
Closed

3.1.0 dumping core after upgrading from 3.0.2 #6597

caffeinejolt opened this issue Feb 13, 2020 · 3 comments
Labels
bug
Milestone

Comments

@caffeinejolt
Copy link

@caffeinejolt caffeinejolt commented Feb 13, 2020

Logged into a VM to test out 3.1.0 to see if worth the upgrade from a slightly patched 3.0.2 RPM (patched to fix some bugs and make it work on CentOS 8). I upgraded fish from https://download.opensuse.org/repositories/shells:/fish:/release:/3/CentOS_8/x86_64/fish-3.1.0-3.1.x86_64.rpm

As soon as I SUed from root to user with default fish shell, fish dumped core:

Process 4739 (fish) of user 1000 dumped core.#012#012
Stack trace of thread 4739:#012
#0  0x00007f3d29d298df raise (libc.so.6)#012
#1  0x00007f3d29d13cf5 abort (libc.so.6)#012
#2  0x000055fc951c5d30 _ZN8parser_tC1ESt10shared_ptrI11env_stack_tE (fish)#012
#3  0x000055fc951c5d81 _ZN8parser_tC1Ev (fish)#012
#4  0x000055fc95104f3f _GLOBAL__sub_I__ZN8parser_tC2ESt10shared_ptrI11env_stack_tE (fish)#012
#5  0x000055fc9521650d __libc_csu_init (fish)#012
#6  0x00007f3d29d157fe __libc_start_main (libc.so.6)#012
#7  0x000055fc95105dfe _start (fish)

For now, I am just not going to upgrade - this possibly be an issue with the RPM build and not a fish issue - just passing along in case helpful.

Thanks for fish!

@zanchey zanchey self-assigned this Feb 13, 2020
@zanchey zanchey added needs more info bug and removed needs more info labels Feb 13, 2020
@zanchey zanchey added this to the fish-future milestone Feb 14, 2020
@zanchey
Copy link
Member

@zanchey zanchey commented Feb 14, 2020

OK, this is caused by starting fish in a directory you don't have access to:

> cd (mktemp -d)
> chmod 000 .
> gdb fish
...
Unable to open the current working directory: Permission denied

Program received signal SIGABRT, Aborted.
0xf7fd7c89 in __kernel_vsyscall ()
(gdb) bt
#0  0xf7fd7c89 in __kernel_vsyscall ()
#1  0xf7b50dd0 in raise () from /lib/i386-linux-gnu/libc.so.6
#2  0xf7b52297 in abort () from /lib/i386-linux-gnu/libc.so.6
#3  0x56650d01 in parser_t::parser_t (this=0x5674ad40, vars=<error reading variable: Cannot access memory at address 0x5>)
    at /home/wheel/zanchey/src/fish-shell/src/parser.cpp:88
#4  0x56650d6a in parser_t::parser_t (this=0x5674ad40) at /home/wheel/zanchey/src/fish-shell/src/parser.cpp:93
#5  0x56592046 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535)
    at /home/wheel/zanchey/src/fish-shell/src/parser.cpp:98
#6  _GLOBAL__sub_I__ZN8parser_tC2ESt10shared_ptrI11env_stack_tE () at /home/wheel/zanchey/src/fish-shell/src/parser.cpp:865
#7  0x566a36fb in __libc_csu_init ()
#8  0xf7b3d216 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6
#9  0x565930d5 in _start ()

@zanchey zanchey removed this from the fish-future milestone Feb 14, 2020
@zanchey zanchey added this to the fish 3.1.1 milestone Feb 14, 2020
@zanchey zanchey removed their assignment Feb 14, 2020
@faho faho closed this as completed in ceba851 Feb 14, 2020
@faho
Copy link
Member

@faho faho commented Feb 14, 2020

Yeah, turns out we abort()ed when it wasn't necessary.

Tho the workaround is super easy: Start fish in an accessable directory.

@ridiculousfish
Copy link
Member

@ridiculousfish ridiculousfish commented Feb 16, 2020

Nice test!

zanchey pushed a commit that referenced this issue Feb 22, 2020
Everything seems to be working, so instead of crashing just print an
error and return.

Fixes #6597

(cherry picked from commit ceba851)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug
Projects
None yet
Development

No branches or pull requests

4 participants