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

Deepin Segmentation Fault #206

Closed
nodefive opened this issue Nov 23, 2019 · 4 comments
Closed

Deepin Segmentation Fault #206

nodefive opened this issue Nov 23, 2019 · 4 comments

Comments

@nodefive
Copy link

nodefive commented Nov 23, 2019

Compiling finishes ok, tests are ok. But when running I get segfault.

unix@deepin:~$ uname -r
4.15.0-30deepin-generic
unix@deepin:~/Desktop/mbpfan$ lsmod | grep -e applesmc -e coretemp
applesmc               20480  0
input_polldev          16384  1 applesmc
coretemp               16384  0
unix@deepin:~/Desktop/mbpfan$ make
mkdir -p bin
Compiling src/minunit...
cc -c  -g  -Wall -Wextra -Wno-unused-function -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500 src/minunit.c -osrc/minunit.o
mkdir -p bin
Compiling src/settings...
cc -c  -g  -Wall -Wextra -Wno-unused-function -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500 src/settings.c -osrc/settings.o
mkdir -p bin
Compiling src/daemon...
cc -c  -g  -Wall -Wextra -Wno-unused-function -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500 src/daemon.c -osrc/daemon.o
mkdir -p bin
Compiling src/mbpfan...
cc -c  -g  -Wall -Wextra -Wno-unused-function -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500 src/mbpfan.c -osrc/mbpfan.o
mkdir -p bin
Compiling src/main...
cc -c  -g  -Wall -Wextra -Wno-unused-function -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500 src/main.c -osrc/main.o
mkdir -p bin
Compiling src/util...
cc -c  -g  -Wall -Wextra -Wno-unused-function -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500 src/util.c -osrc/util.o
mkdir -p bin
Compiling src/strmap...
cc -c  -g  -Wall -Wextra -Wno-unused-function -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500 src/strmap.c -osrc/strmap.o
Linking...
cc  -g src/minunit.o src/settings.o src/daemon.o src/mbpfan.o src/main.o src/util.o src/strmap.o -lm -o bin/mbpfan
unix@deepin:~/Desktop/mbpfan$ sudo cp mbpfan.conf /etc/
unix@deepin:~/Desktop/mbpfan$ sudo ./bin/mbpfan -t
Starting the tests..
It is normal for them to take a bit to finish.
Testing the _supplied_ mbpfan.conf (not the one you are using)..
ALL TESTS PASSED
Tests run: 7
unix@deepin:~/Desktop/mbpfan$ sudo bin/mbpfan 
Segmentation fault
@gaul
Copy link
Member

gaul commented Nov 24, 2019

Can you run mbpfan under valgrind or gdb and get the backtrace?

@nodefive
Copy link
Author

nodefive commented Nov 24, 2019

Sure. Here:

Program received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/x86_64/strlen.S:106
106	../sysdeps/x86_64/strlen.S: No such file or directory.
#0  strlen () at ../sysdeps/x86_64/strlen.S:106
#1  0x00007ffff777eda8 in _IO_vfprintf_internal (s=0x7ffff7ad0600 <_IO_2_1_stdout_>, format=<optimized out>, ap=0x7fffffffcf78) at vfprintf.c:1637
#2  0x0000555555559272 in mbp_log (level=6, fmt=0x555555559fea "%s %s starting up") at src/util.c:15
#3  0x0000555555557896 in go_daemon (fan_control=0x5555555589d3 <mbpfan>) at src/daemon.c:160
#4  0x00005555555591a0 in main (argc=1, argv=0x7fffffffd188) at src/main.c:132

I'm running mbpfan in a 8,1 machine.

@gaul gaul closed this as completed in 7ac2eb0 Nov 24, 2019
@gaul
Copy link
Member

gaul commented Nov 24, 2019

Thanks for reporting this! Could you check if the latest master fixes your symptoms? If so I will release 2.2.1.

@nodefive
Copy link
Author

Now works just fine :-) Thanks Andrew

Starting program: /home/unix/Desktop/mbpfan/bin/mbpfan 
mbpfan 2.2.0 starting up
[Inferior 1 (process 9005) exited normally]
 unix [~/Desktop/mbpfan] $ psg mbp
 8436 ?        00:00:00 mbpfan

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

2 participants