Skip to content

lsipc crashes when not ran inside an xsession (gnome) #290

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

Open
ht990332 opened this issue Feb 24, 2016 · 6 comments
Open

lsipc crashes when not ran inside an xsession (gnome) #290

ht990332 opened this issue Feb 24, 2016 · 6 comments

Comments

@ht990332
Copy link

lsipc is crashing for me when ran outside xorg.
img_20160224_145603
I took a picture of the crash data.

It runs fine if I do lsipc inside gnome.

@karelzak
Copy link
Collaborator

Strange, I'm not able to reproduce something like this. Is it the latest git tree?

It would be nice to have output from "bt" gdb command after segfault and also try execute the command with:

  LIBSMARTCOLS_DEBUG=all lsipc

to get more verbose output about output table formatting. Thanks.

@ht990332
Copy link
Author

This happened with release version 2.27.1
I'll try that command.

@ht990332
Copy link
Author

log.txt
after that, it immediately segfaults.

@karelzak
Copy link
Collaborator

Maybe the problem is strcmp(nl_langinfo(CODESET), ... it would be more robust to check if nl_langinfo() returns anything.

@rudimeier
Copy link
Contributor

Could you please also provide the suggested backtrace using gdb's "bt" command.

$ echo -e "run\nbt" | gdb -x /dev/stdin  lsipc

You could add &>bt.log to get the output in a file rather than console screenshot but maybe it's not crashing then if stdout is no tty.

@ht990332
Copy link
Author

I did the following:
echo -e "run\nbt" | gdb -x /dev/stdin  lsipc &>bt.log

GNU gdb (GDB) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl
.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from lsipc...done.
/dev/stdin: No such file or directory.
(gdb) Starting program: /usr/bin/lsipc 

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7bbb375 in scols_cell_get_data (ce=0x4547415353454d5f)
    at libsmartcols/src/cell.c:108
108 libsmartcols/src/cell.c: No such file or directory.
(gdb) #0  0x00007ffff7bbb375 in scols_cell_get_data
(ce=0x4547415353454d5f)
    at libsmartcols/src/cell.c:108
#1  0x00007ffff7bbf888 in strlen_line (ln=0x611db0)
    at libsmartcols/src/table_print.c:919
#2  scols_print_table (tb=tb@entry=0x611050)
    at libsmartcols/src/table_print.c:968
#3  0x000000000040361d in print_table (ctl=,
tb=0x611050)
    at sys-utils/lsipc.c:428
#4  main (argc=, argv=) at sys-
utils/lsipc.c:1329
(gdb) quit
A debugging session is active.

Inferior 1 [process 3336] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants