Comments (16)
Hi,
Thank you very much for your issue report. It looks like you found an important bug.
It's pretty hard to debug a segfault just looking at thousand lines of code, so I would need some additional information:
- Build cpufetch with debug symbols (
make clean; make debug
). - Debug
cpufetch
(gdb cpufetch
) - Run cpufetch (just
r
insidegdb
)
And finally, paste here the output of the execution. It should tell you where did the segmentation fault occurred.
Thanks!
from cpufetch.
Starting program: /home/felipe/cpufetch/cpufetch
Program received signal SIGSEGV, Segmentation fault.
0xb6fbbb10 in memcpy () from /usr/lib/arm-linux-gnueabihf/libarmmem-v6l.so
from cpufetch.
Hi,
Sorry but that is not enough information to properly track the issue...Can you run cpufetch under valgrind? Steps:
- Install valgrind (I hope it can be installed with
sudo apt-get install valgrind
). - Build
cpufetch
with debug symbols (make clean; make debug
). - Run cpufetch with valgrind (
valgrind ./cpufetch
).
Paste the full output here. It should be clear enough to understand what's happening.
from cpufetch.
https://pastebin.com/KJgbikpf
I did it both with and without --leak-check=full. I'll post the other one in a second
from cpufetch.
from cpufetch.
It looks like this is going to be a hard bug to find.
I've just pushed a commit to bugfix2
branch. Change to it (git checkout bugfix2
), and let's see how it goes.
from cpufetch.
Standard run (with make debug)
Valgrind on the way
from cpufetch.
https://pastebin.com/2FzSPbZC
Valgrind output of make debug of branch bugfix2
from cpufetch.
Try again with the latest commit in bugfix2
and paste the output, but just the output of cpufetch
(no gdb
or valgrind
this time). Paste also the contents of the file /sys/devices/system/cpu/present
. Thanks.
I expect to solve the "Microarchitecture: Unknown" part with this commit. For the issue of number of cores, I will wait to see the contents of the file I told you about, and I will decide what to do then.
from cpufetch.
Did a git pull, make clean, make
Here's the result
from cpufetch.
Great, the microarchitecture problem is solved, but you forgot to post the contents of the file I mentioned.
Would you mind to paste them here? Thanks
from cpufetch.
Shoot my bad. I just did a sudo cat /sys/devices/system/cpu/present
the result is a 0
that's it, jsut a fat 0 ?
from cpufetch.
Whooops!
Yes, it makes sense that it contains just a fat 0. The problem is that when I wrote the code to query the number of cores I didn't consider the case of a CPU with just one core, that's why in your case it was not working (Segmentation fault). In the previous commit I just made the code to always report that the CPU has 1 core (I did this for debugging purposes). I have pushed a commit in which the code reports the number of cores again, but considering the case of just one core.
So I need you to update again and run the latest commit. Everything should work well. If this is the case, I think we solved the issue! Let me know how it goes.
from cpufetch.
worked fine from the bugfix2 branch pulled just now.
from cpufetch.
Then I think we can consider the issue solved. Thank you very much for reporting this and help me by running all the tests, I have learned a lot!
I will merge the changes into master branch soon. Closing the issue.
from cpufetch.
from cpufetch.
Related Issues (20)
- Change error message when uarch is not detected HOT 1
- Rockchip RK35xx detection flaws HOT 4
- Apple M3 recognition support HOT 12
- crash on AMD HOT 3
- Refactor Apple SoC detection HOT 2
- Review NULL checking before free HOT 1
- New laptop with Ryzen 7 PRO 7840U doesn't work. HOT 2
- Unknown microarchitecture detected HOT 3
- [ERROR]: Found invalid cpu_family: 0x5F4DEA93 HOT 4
- Apple VZ hypervisor not detected HOT 3
- Sipeed is not a SoC vendor HOT 1
- Missing data for Pentium III HOT 15
- Unknown microarchitecture detected HOT 1
- Implement code formatting and document important functions
- [ERROR]: Unknown microarchitecture detected: M=0x0000000A EM=0x0000000B F=0x00000006 EF=0x00000000 S=0x00000003 HOT 1
- Print different error message if the build is release or not HOT 1
- [ERROR]: Found invalid cpu_family: 0x5F4DEA93 (M3 pro macbook pro) HOT 1
- Windows on ARM support HOT 2
- Add support for NO_COLOR HOT 1
- Implement get_topology_from_udev
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpufetch.