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

Calling cpu.CPUTimes() on Android results in a stacktrace #836

Closed
xspeed1989 opened this issue Feb 11, 2020 · 4 comments
Closed

Calling cpu.CPUTimes() on Android results in a stacktrace #836

xspeed1989 opened this issue Feb 11, 2020 · 4 comments

Comments

@xspeed1989
Copy link

xspeed1989 commented Feb 11, 2020

github.com/jpillora/cloud-torrent/vendor/github.com/shirou/gopsutil/cpu.parseStatLine(0x5bb1f1bdc0, 0x0, 0x1, 0x400017f340, 0x40000fdd40)
/data/data/com.termux/files/home/go/src/github.com/jpillora/cloud-torrent/vendor/github.com/shirou/gopsutil/cpu/cpu_linux.go:169 +0x5cc github.com/jpillora/cloud-torrent/vendor/github.com/shirou/gopsutil/cpu.CPUTimes(0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/data/data/com.termux/files/home/go/src/github.com/jpillora/cloud-torrent/vendor/github.com/shirou/gopsutil/cpu/cpu_linux.go:49 +0x23c
github.com/jpillora/cloud-torrent/server.(*stats).loadStats(0x4000144200, 0x4000029280, 0x31)
/data/data/com.termux/files/home/go/src/github.com/jpillora/cloud-torrent/server/server_stats.go:28 +0x3c github.com/jpillora/cloud-torrent/server.
(*Server).Run.func2(0x4000144000) /data/data/com.termux/files/home/go/src/github.com/jpillora/cloud-torrent/server/server.go:132 +0x70 created by github.com/jpillora/cloud-torrent/server.(*Server).Run /data/data/com.termux/files/home/go/src/github.com/jpillora/cloud-torrent/server/server.go:129 +0x4cc
@Lomanic
Copy link
Collaborator

Lomanic commented Feb 11, 2020

Please properly format your stacktrace (surrounded by ```) and give some context (this is what the issue templates are for…), I shouldn't have to dig in barely readable unformatted text to gather some bits of context (that you are compiling and running github.com/jpillora/cloud-torrent on an Android phone with termux).

That being said, the stacktrace comes from this line.

  • cpu.CPUTimes gets its information from /proc/stat, can you paste its content here? Please surround its content with ```
  • please tell us the Android version you are running
  • this vendored version of gopsutil is very old, it doesn't include this fix from 2017(!), update to a recent version

All in all, this has to be solved downstream (you already opened jpillora/cloud-torrent#306 for this).

I'm still interested in the content of your /proc/stat file and the version of Android you are running as it is valuable information for others (it was reported that /proc/filesystems was not readable anymore in Android 8 or that /proc/sys/kernel/os_release was not readable anymore on Android 9 for example)

@Lomanic Lomanic changed the title Issue on android(arm) Calling cpu.CPUTimes() on Android results in a stacktrace Feb 11, 2020
@xspeed1989
Copy link
Author

cpu  7500694 1460513 6169691 8956599 165345 858508 413911 0 0 0
cpu0 1880610 482474 1644842 8241378 159508 283814 136260 0 0 0
cpu1 1762524 514585 1464132 75872 1610 193218 80800 0 0 0
cpu2 1105374 80778 1115132 88915 908 163321 71822 0 0 0
cpu3 418235 31943 668455 108504 650 130054 84222 0 0 0
cpu4 524978 88149 300069 107884 723 17722 6040 0 0 0
cpu5 653892 92892 342231 109817 762 26036 7466 0 0 0
cpu6 642704 87795 328237 111947 593 25382 6986 0 0 0
cpu7 512377 81897 306593 112282 591 18961 20315 0 0 0
intr 586188167 0 0 0 0 81617909 0 10121127 7472719 230485 17673 0 1279055 0 1844660 0 182195 0 561470 161347 160852 22798560 509145 78332 0 0 0 63676 15360 3434 2629 0 0 0 0 0 0 0 0 0 0 0 0 0 5342 348 12 0 0 0 0 0 0 366791 2378 0 0 0 0 0 0 0 0 569 0 0 0 0 0 0 0 0 0 0 0 0 0 18 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 553 0 0 0 0 0 0 0 27 31909926 98291 294374 5295877 5203042 398 0 830 29393 0 6 1252170 3040828 470700 0 0 0 0 0 582229 587866 6380290 0 0 0 0 0 100183 0 5 0 0 0 0 0 0 0 0 0 0 1875706 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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 1674 0 464 360 38721 2 25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3239792 0 9 0 0 569 6 0 7 10 0 0 0 0 44 0 0 370718 133 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3988 0 0
ctxt 911457283
btime 1581266121
processes 949303
procs_running 2
procs_blocked 0
softirq 147554364 449703 28324531 400427 6730637 22063788 0 42387315 23109144 0 24088819

@xspeed1989
Copy link
Author

Please properly format your stacktrace (surrounded by ```) and give some context (this is what the issue templates are for…), I shouldn't have to dig in barely readable unformatted text to gather some bits of context (that you are compiling and running github.com/jpillora/cloud-torrent on an Android phone with termux).

That being said, the stacktrace comes from this line.

  • cpu.CPUTimes gets its information from /proc/stat, can you paste its content here? Please surround its content with ```
  • please tell us the Android version you are running
  • this vendored version of gopsutil is very old, it doesn't include this fix from 2017(!), update to a recent version

All in all, this has to be solved downstream (you already opened jpillora/cloud-torrent#306 for this).

I'm still interested in the content of your /proc/stat file and the version of Android you are running as it is valuable information for others (it was reported that /proc/filesystems was not readable anymore in Android 8 or that /proc/sys/kernel/os_release was not readable anymore on Android 9 for example)

android 9

@Lomanic
Copy link
Collaborator

Lomanic commented Feb 16, 2020

Is the stacktrace still happening after updating gopsutil?

@Lomanic Lomanic closed this as completed May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants