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

Recently released EdgeAgent container v1.0.10 causes iotedged v1.0.9.4 to crash on Yocto arm64 build #3746

Closed
Lexmark-chad opened this issue Oct 17, 2020 · 21 comments
Assignees
Labels
1.0.10 Targeted for 1.0.10 bug Something isn't working customer-reported iotedge

Comments

@Lexmark-chad
Copy link

Lexmark-chad commented Oct 17, 2020

We have a custom embedded yocto build on an arm64 platform utilizing Azure IoT Edge. Earlier this week when new versions of Azure IoT Edge and associated EdgeAgent / EdgeHub containers were released we observed iotedge caught in a crash loop in all of our devices. Both config.yaml and the deployment manifests specified edgeAgent versions of "1.0" (i.e., 'rolling tags'). After the release earlier in the week the devices updated to the 1.0.10 version of edgeAgent and upon restart of edgeAgent iotedge then began to crash in a loop. We have since pinned our config.yaml and deployment manifests to version 1.0.9 to get everything working again.

Expected Behavior

I expected that the recently released containers (v1.0.10) would have been compatible with the previous version of iotedge (v1.0.9.4).

Current Behavior

iotedge always crashes with this output:

Oct 17 13:54:26 granite2v8 iotedged[7581]: 2020-10-17T13:54:26Z [INFO] - Querying system resources...
Oct 17 13:54:26 granite2v8 iotedged[7581]: thread 'tokio-runtime-worker-2' panicked at 'byte index 5 is out of bounds of `temp`', src/libcore/str/mod.rs:2051:9
Oct 17 13:54:26 granite2v8 iotedged[7581]: stack backtrace:
Oct 17 13:54:27 granite2v8 iotedged[7581]: 2020-10-17T13:54:27Z [INFO] - [mgmt] - - - [2020-10-17 13:54:27.394396429 UTC] "GET /modules?api-version=2019-11-05 HTTP/1.1" 200 OK 449 "-" "-" auth_id(-)
Oct 17 13:54:31 granite2v8 iotedged[7581]:    0:       0x5561fe6688 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf8c4e400e993a20c
Oct 17 13:54:31 granite2v8 systemd[1]: iotedge.service: Main process exited, code=killed, status=6/ABRT
Oct 17 13:54:31 granite2v8 systemd[1]: iotedge.service: Failed with result 'signal'.

Steps to Reproduce

See problem description above.

Context (Environment)

Output of iotedge check

Interestingly, iotedge check also fails in a similar way.

thread 'tokio-runtime-worker-3' panicked at 'byte index 5 is out of bounds of `temp`', src/libcore/str/mod.rs:2051:9
stack backtrace:
   0:       0x5561a82940 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf8c4e400e993a20c
Aborted

A similar issue was previously logged, but never resolved. There seems to be a difference though in that the issue below was at least able to get a full stacktrace (although RUST_BACKTRACE was not enabled).

#2747

Device Information

  • Host OS [e.g. Ubuntu 16.04, Ubuntu 18.04, Windows IoT Core]: arm-poky-linux-musleabi
  • Architecture [e.g. amd64, arm32, arm64]: arm64
  • Container OS [e.g. Linux containers, Windows containers]: Linux containers

Runtime Versions

  • iotedged [run iotedge version: 1.0.9.4
  • Edge Agent [image tag (e.g. 1.0.0)]: 1.0
  • Edge Hub [image tag (e.g. 1.0.0)]: 1.0
  • Docker/Moby [run docker version]:
Client:
 Version:           19.03.2-ce
 API version:       1.40
 Go version:        go1.12.9
 Git commit:        6a30dfca03
 Built:             Thu Oct 15 19:24:39 2020
 OS/Arch:           linux/arm64
 Experimental:      false

Server:
 Engine:
  Version:          19.03.2-ce
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.9
  Git commit:       6a30dfca03664a0b6bf0646a7d389ee7d0318e6e
  Built:            Thu Oct 15 19:23:38 2020
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          v1.2.7-11-gfd103cb71.m
  GitCommit:        fd103cb716352c7e19768e4fed057f71d68902a0.m
 runc:
  Version:          1.0.0-rc8
  GitCommit:        425e105d5a03fabd737a126ad93d62a9eeede87f-dirty
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683-dirty

Logs

iotedged logs
Oct 17 13:52:30 granite2v8 iotedged[7581]: 2020-10-17T13:52:30Z [INFO] - Configuring certificates...
Oct 17 13:52:30 granite2v8 iotedged[7581]: 2020-10-17T13:52:30Z [INFO] - Transparent gateway certificates not found, operating in quick start mode...
Oct 17 13:52:30 granite2v8 iotedged[7581]: 2020-10-17T13:52:30Z [INFO] - Finished configuring provisioning environment variables and certificates.
Oct 17 13:52:30 granite2v8 iotedged[7581]: 2020-10-17T13:52:30Z [INFO] - Initializing hsm...
Oct 17 13:52:30 granite2v8 iotedged[7581]: 2020-10-17T13:52:30Z [INFO] - Finished initializing hsm.
Oct 17 13:52:30 granite2v8 iotedged[7581]: 2020-10-17T13:52:30Z [INFO] - Initializing hsm X509 interface...
Oct 17 13:52:30 granite2v8 iotedged[7581]: 2020-10-17T13:52:30Z [INFO] - Finished initializing hsm X509 interface...
Oct 17 13:52:30 granite2v8 iotedged[7581]: 2020-10-17T13:52:30Z [INFO] - Provisioning edge device...
Oct 17 13:52:30 granite2v8 iotedged[7581]: 2020-10-17T13:52:30Z [INFO] - Starting provisioning edge device via X509 provisioning...
Oct 17 13:52:30 granite2v8 iotedged[7581]: 2020-10-17T13:52:30Z [INFO] - Starting DPS registration with scope_id "<omitted>", registration_id "<omitted>"
Oct 17 13:52:41 granite2v8 iotedged[7581]: 2020-10-17T13:52:41Z [INFO] - DPS registration assigned device "<omitted>" in hub "<omitted>"
Oct 17 13:52:41 granite2v8 iotedged[7581]: 2020-10-17T13:52:41Z [INFO] - Successful DPS provisioning.
Oct 17 13:52:41 granite2v8 iotedged[7581]: 2020-10-17T13:52:41Z [INFO] - Finished provisioning edge device.
Oct 17 13:52:41 granite2v8 iotedged[7581]: 2020-10-17T13:52:41Z [INFO] - Initializing the module runtime...
Oct 17 13:52:41 granite2v8 iotedged[7581]: 2020-10-17T13:52:41Z [INFO] - Initializing module runtime...
Oct 17 13:52:41 granite2v8 iotedged[7581]: 2020-10-17T13:52:41Z [INFO] - Using runtime network id azure-iot-edge
Oct 17 13:52:41 granite2v8 iotedged[7581]: 2020-10-17T13:52:41Z [INFO] - Successfully initialized module runtime
Oct 17 13:52:41 granite2v8 iotedged[7581]: 2020-10-17T13:52:41Z [INFO] - Finished initializing the module runtime.
Oct 17 13:52:41 granite2v8 iotedged[7581]: 2020-10-17T13:52:41Z [INFO] - Reprovisioning status InitialAssignment will trigger reconfiguration of modules.
Oct 17 13:52:41 granite2v8 iotedged[7581]: 2020-10-17T13:52:41Z [INFO] - Detecting if configuration file has changed...
Oct 17 13:52:41 granite2v8 iotedged[7581]: 2020-10-17T13:52:41Z [INFO] - Change to configuration file detected.
Oct 17 13:52:41 granite2v8 iotedged[7581]: 2020-10-17T13:52:41Z [INFO] - Removing all modules...
Oct 17 13:52:41 granite2v8 iotedged[7581]: 2020-10-17T13:52:41Z [INFO] - Finished removing modules.
Oct 17 13:52:41 granite2v8 iotedged[7581]: 2020-10-17T13:52:41Z [INFO] - Edge issuer CA expiration date: 2021-01-15T13:49:27Z
Oct 17 13:52:42 granite2v8 iotedged[7581]: 2020-10-17T13:52:42Z [INFO] - Starting management API...
Oct 17 13:52:42 granite2v8 iotedged[7581]: 2020-10-17T13:52:42Z [INFO] - Starting workload API...
Oct 17 13:52:42 granite2v8 iotedged[7581]: 2020-10-17T13:52:42Z [INFO] - Starting watchdog with 60 second frequency...
Oct 17 13:52:42 granite2v8 iotedged[7581]: 2020-10-17T13:52:42Z [INFO] - Listening on fd://iotedge.mgmt.socket/ with 1 thread for management API.
Oct 17 13:52:42 granite2v8 iotedged[7581]: 2020-10-17T13:52:42Z [INFO] - Listening on fd://iotedge.socket/ with 1 thread for workload API.
Oct 17 13:52:42 granite2v8 iotedged[7581]: 2020-10-17T13:52:42Z [INFO] - Checking edge runtime status
Oct 17 13:52:43 granite2v8 iotedged[7581]: 2020-10-17T13:52:43Z [INFO] - Creating and starting edge runtime module edgeAgent
Oct 17 13:52:43 granite2v8 iotedged[7581]: 2020-10-17T13:52:43Z [INFO] - Updating identity for module $edgeAgent
Oct 17 13:52:43 granite2v8 iotedged[7581]: 2020-10-17T13:52:43Z [INFO] - Pulling image mcr.microsoft.com/azureiotedge-agent:1.0...
Oct 17 13:53:16 granite2v8 iotedged[7581]: 2020-10-17T13:53:16Z [INFO] - Successfully pulled image mcr.microsoft.com/azureiotedge-agent:1.0
Oct 17 13:53:16 granite2v8 iotedged[7581]: 2020-10-17T13:53:16Z [INFO] - Creating module edgeAgent...
Oct 17 13:53:21 granite2v8 iotedged[7581]: 2020-10-17T13:53:21Z [INFO] - Successfully created module edgeAgent
Oct 17 13:53:21 granite2v8 iotedged[7581]: 2020-10-17T13:53:21Z [INFO] - Starting module edgeAgent...
Oct 17 13:53:22 granite2v8 iotedged[7581]: 2020-10-17T13:53:22Z [INFO] - Successfully started module edgeAgent
Oct 17 13:53:25 granite2v8 iotedged[7581]: 2020-10-17T13:53:25Z [INFO] - [work] - - - [2020-10-17 13:53:25.330173398 UTC] "GET /trust-bundle?api-version=2019-01-30 HTTP/1.1" 200 OK 1944 "-" "-" auth_id(-)
Oct 17 13:53:26 granite2v8 iotedged[7581]: 2020-10-17T13:53:26Z [INFO] - Querying system info...
Oct 17 13:53:27 granite2v8 iotedged[7581]: 2020-10-17T13:53:27Z [INFO] - Successfully queried system info
Oct 17 13:53:27 granite2v8 iotedged[7581]: 2020-10-17T13:53:27Z [INFO] - [mgmt] - - - [2020-10-17 13:53:27.047224728 UTC] "GET /systeminfo?api-version=2019-11-05 HTTP/1.1" 200 OK 63 "-" "-" auth_id(-)
Oct 17 13:53:29 granite2v8 iotedged[7581]: 2020-10-17T13:53:29Z [INFO] - [work] - - - [2020-10-17 13:53:29.777264970 UTC] "POST /modules/%24edgeAgent/genid/637385393794724236/sign?api-version=2018-06-28 HTTP/1.1" 200 OK 57 "-" "-" auth_id(-)
Oct 17 13:53:29 granite2v8 iotedged[7581]: 2020-10-17T13:53:29Z [INFO] - Querying system info...
Oct 17 13:53:29 granite2v8 iotedged[7581]: 2020-10-17T13:53:29Z [INFO] - Successfully queried system info
Oct 17 13:53:29 granite2v8 iotedged[7581]: 2020-10-17T13:53:29Z [INFO] - [mgmt] - - - [2020-10-17 13:53:29.919436595 UTC] "GET /systeminfo?api-version=2019-11-05 HTTP/1.1" 200 OK 63 "-" "-" auth_id(-)
Oct 17 13:53:30 granite2v8 iotedged[7581]: 2020-10-17T13:53:30Z [INFO] - [mgmt] - - - [2020-10-17 13:53:30.297766999 UTC] "GET /modules?api-version=2019-11-05 HTTP/1.1" 200 OK 449 "-" "-" auth_id(-)
Oct 17 13:53:37 granite2v8 iotedged[7581]: 2020-10-17T13:53:37Z [INFO] - [mgmt] - - - [2020-10-17 13:53:37.031230595 UTC] "GET /modules?api-version=2019-11-05 HTTP/1.1" 200 OK 449 "-" "-" auth_id(-)
Oct 17 13:53:42 granite2v8 iotedged[7581]: 2020-10-17T13:53:42Z [INFO] - [mgmt] - - - [2020-10-17 13:53:42.061385837 UTC] "GET /modules?api-version=2019-11-05 HTTP/1.1" 200 OK 449 "-" "-" auth_id(-)
Oct 17 13:53:42 granite2v8 iotedged[7581]: 2020-10-17T13:53:42Z [INFO] - Checking edge runtime status
Oct 17 13:53:43 granite2v8 iotedged[7581]: 2020-10-17T13:53:43Z [INFO] - Edge runtime is running.
Oct 17 13:53:47 granite2v8 iotedged[7581]: 2020-10-17T13:53:47Z [INFO] - [mgmt] - - - [2020-10-17 13:53:47.127359605 UTC] "GET /modules?api-version=2019-11-05 HTTP/1.1" 200 OK 449 "-" "-" auth_id(-)
Oct 17 13:53:52 granite2v8 iotedged[7581]: 2020-10-17T13:53:52Z [INFO] - [mgmt] - - - [2020-10-17 13:53:52.166255713 UTC] "GET /modules?api-version=2019-11-05 HTTP/1.1" 200 OK 449 "-" "-" auth_id(-)
Oct 17 13:53:57 granite2v8 iotedged[7581]: 2020-10-17T13:53:57Z [INFO] - [mgmt] - - - [2020-10-17 13:53:57.196400126 UTC] "GET /modules?api-version=2019-11-05 HTTP/1.1" 200 OK 449 "-" "-" auth_id(-)
Oct 17 13:54:02 granite2v8 iotedged[7581]: 2020-10-17T13:54:02Z [INFO] - [mgmt] - - - [2020-10-17 13:54:02.227786806 UTC] "GET /modules?api-version=2019-11-05 HTTP/1.1" 200 OK 449 "-" "-" auth_id(-)
Oct 17 13:54:07 granite2v8 iotedged[7581]: 2020-10-17T13:54:07Z [INFO] - [mgmt] - - - [2020-10-17 13:54:07.259238973 UTC] "GET /modules?api-version=2019-11-05 HTTP/1.1" 200 OK 449 "-" "-" auth_id(-)
Oct 17 13:54:12 granite2v8 iotedged[7581]: 2020-10-17T13:54:12Z [INFO] - [mgmt] - - - [2020-10-17 13:54:12.280794218 UTC] "GET /modules?api-version=2019-11-05 HTTP/1.1" 200 OK 449 "-" "-" auth_id(-)
Oct 17 13:54:17 granite2v8 iotedged[7581]: 2020-10-17T13:54:17Z [INFO] - [mgmt] - - - [2020-10-17 13:54:17.338447759 UTC] "GET /modules?api-version=2019-11-05 HTTP/1.1" 200 OK 449 "-" "-" auth_id(-)
Oct 17 13:54:22 granite2v8 iotedged[7581]: 2020-10-17T13:54:22Z [INFO] - [mgmt] - - - [2020-10-17 13:54:22.375398853 UTC] "GET /modules?api-version=2019-11-05 HTTP/1.1" 200 OK 449 "-" "-" auth_id(-)
Oct 17 13:54:26 granite2v8 iotedged[7581]: 2020-10-17T13:54:26Z [INFO] - Querying system resources...
Oct 17 13:54:26 granite2v8 iotedged[7581]: thread 'tokio-runtime-worker-2' panicked at 'byte index 5 is out of bounds of `temp`', src/libcore/str/mod.rs:2051:9
Oct 17 13:54:26 granite2v8 iotedged[7581]: stack backtrace:
Oct 17 13:54:27 granite2v8 iotedged[7581]: 2020-10-17T13:54:27Z [INFO] - [mgmt] - - - [2020-10-17 13:54:27.394396429 UTC] "GET /modules?api-version=2019-11-05 HTTP/1.1" 200 OK 449 "-" "-" auth_id(-)
Oct 17 13:54:31 granite2v8 iotedged[7581]:    0:       0x5561fe6688 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf8c4e400e993a20c
Oct 17 13:54:31 granite2v8 systemd[1]: iotedge.service: Main process exited, code=killed, status=6/ABRT
Oct 17 13:54:31 granite2v8 systemd[1]: iotedge.service: Failed with result 'signal'.
Oct 17 13:54:31 granite2v8 systemd[1]: iotedge.service: Service RestartSec=100ms expired, scheduling restart.
Oct 17 13:54:31 granite2v8 systemd[1]: iotedge.service: Scheduled restart job, restart counter is at 1.
Oct 17 13:54:31 granite2v8 systemd[1]: Stopped Azure IoT Edge daemon.

Additional Information

We are building iotedge via this meta-iotedge layer:

https://github.com/Azure/meta-iotedge/tree/zeus

@veyalla
Copy link
Contributor

veyalla commented Oct 20, 2020

Thanks for the report, we'll investigate.

@veyalla veyalla assigned veyalla and dylanbronson and unassigned veyalla Oct 20, 2020
@dylanbronson
Copy link
Contributor

Similar to the issue linked in this one, the backtrace is truncated. This is probably because it's a release build. Are you able to try with a debug build? This might let us see the backtrace code.

There is also a chance that it's actual truncation, and that by doing "journalctl" with no filtering we might see more.

@Lexmark-chad
Copy link
Author

I modified both meta-iotedge/recipes-core/iotedge-daemon/iotedge-daemon.inc and meta-iotedge/recipes-core/iotedge-cli/iotedge-cli.inc to include INHIBIT_PACKAGE_STRIP = "1" to retain debug symbols. I don't see anything specific in iotedge's devguide for how to build a 'debug' build. Please advise.

@arsing
Copy link
Member

arsing commented Oct 21, 2020

I don't see anything specific in iotedge's devguide for how to build a 'debug' build. Please advise.

I'm not familiar with the yocto build but I assume it implicitly invokes make install ? If so, you'll have to remove the --release flag passed to cargo build, ie https://github.com/Azure/iotedge/blob/1.0.10/edgelet/Makefile#L61 , and also change https://github.com/Azure/iotedge/blob/1.0.10/edgelet/Makefile#L2 to target/debug

@Lexmark-chad
Copy link
Author

I've confirmed that the information provided was, in fact, from a debug build. The poky build generates an auto.conf which has DEBUG_BUILD = "1" defined based on the flavor of the build our tools establish when the build workspace is setup. This in turn sets the build type appropriately in meta-rust's cargo.bbclass file which is used in building iotedge.

@arsing
Copy link
Member

arsing commented Oct 21, 2020

There would be a lot more frames in the backtrace if it were a debug build. So either it isn't a debug build, or something else has broken the backtrace-taking code on yocto (not impossible).

Like I said in #2747 the string that's being indexed incorrectly doesn't appear to be in our code nor our deps, so we can't tell without a proper backtrace who the culprit is.

Maybe configure your distro to take a coredump, and see if a debugger gives a better stack trace than the built-in stack-walker.

@Lexmark-chad
Copy link
Author

I added gdb to our build. I focused on iotedge check because it's the simplest to recreate and run in the debugger.

(gdb) r
Starting program: /usr/bin/iotedge check
warning: Unable to determine the number of hardware watchpoints available.
warning: Unable to determine the number of hardware breakpoints available.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[New Thread 0x7ff7a81fc0 (LWP 1893)]
[New Thread 0x7ff787cfc0 (LWP 1894)]
[New Thread 0x7ff7677fc0 (LWP 1895)]
[New Thread 0x7ff7476fc0 (LWP 1896)]
[New Thread 0x7ff7271fc0 (LWP 1897)]
[New Thread 0x7ff7068fc0 (LWP 1898)]
[New Thread 0x7ff6e63fc0 (LWP 1899)]
[New Thread 0x7ff6a01fc0 (LWP 1900)]
[New Thread 0x7ff6c02fc0 (LWP 1901)]
[Thread 0x7ff7271fc0 (LWP 1897) exited]
[Thread 0x7ff7476fc0 (LWP 1896) exited]
[Thread 0x7ff7677fc0 (LWP 1895) exited]
[Thread 0x7ff787cfc0 (LWP 1894) exited]
thread 'tokio-runtime-worker-0' panicked at 'byte index 5 is out of bounds of `temp`', src/libcore/str/mod.rs:2051:9
stack backtrace:
   0:       0x5555a1b940 - <unknown>

Thread 7 "tokio-runtime-w" received signal SIGABRT, Aborted.

Output of info threads:

(gdb) info threads
  Id   Target Id                                        Frame 
  1    Thread 0x7ff7ff2010 (LWP 1890) "iotedge"         0x0000007ff7cb24ec in futex_wait_cancelable (private=0, expected=0, futex_word=0x5555c698d8)
    at /usr/src/debug/glibc/2.30-r0/git/sysdeps/unix/sysv/linux/futex-internal.h:80
  2    Thread 0x7ff7a81fc0 (LWP 1893) "iotedge"         0x0000007ff7bfcf38 in __GI_epoll_pwait (epfd=3, events=0x5555bc0fb0, maxevents=1024, timeout=-1, set=set@entry=0x0)
    at /usr/src/debug/glibc/2.30-r0/git/sysdeps/unix/sysv/linux/epoll_pwait.c:42
* 7    Thread 0x7ff7068fc0 (LWP 1898) "tokio-runtime-w" __GI_raise (sig=sig@entry=6) at /usr/src/debug/glibc/2.30-r0/git/sysdeps/unix/sysv/linux/raise.c:51
  8    Thread 0x7ff6e63fc0 (LWP 1899) "tokio-runtime-w" 0x0000007ff7cb24ec in futex_wait_cancelable (private=0, expected=0, futex_word=0x5555bbf80c)
    at /usr/src/debug/glibc/2.30-r0/git/sysdeps/unix/sysv/linux/futex-internal.h:80
  9    Thread 0x7ff6a01fc0 (LWP 1900) "tokio-runtime-w" 0x0000007ff7cb24ec in futex_wait_cancelable (private=0, expected=0, futex_word=0x5555bb7f2c)
    at /usr/src/debug/glibc/2.30-r0/git/sysdeps/unix/sysv/linux/futex-internal.h:80
  10   Thread 0x7ff6c02fc0 (LWP 1901) "tokio-runtime-w" 0x0000007ff7cb24ec in futex_wait_cancelable (private=0, expected=0, futex_word=0x5555bbf318)
    at /usr/src/debug/glibc/2.30-r0/git/sysdeps/unix/sysv/linux/futex-internal.h:80

Backtrace of thread 7 which SIGABRT'd:

(gdb) bt     
#0  __GI_raise (sig=sig@entry=6) at /usr/src/debug/glibc/2.30-r0/git/sysdeps/unix/sysv/linux/raise.c:51
#1  0x0000007ff7b5d518 in __GI_abort () at /usr/src/debug/glibc/2.30-r0/git/stdlib/abort.c:79
#2  0x0000005555a1fe20 in panic_abort::__rust_start_panic::abort ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Backtrace of thread 1:

(gdb) bt
#0  0x0000007ff7cb24ec in futex_wait_cancelable (private=0, expected=0, futex_word=0x5555c698d8) at /usr/src/debug/glibc/2.30-r0/git/sysdeps/unix/sysv/linux/futex-internal.h:80
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7fffffb324, cond=0x5555c698b0) at /usr/src/debug/glibc/2.30-r0/git/nptl/pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x5555c698b0, mutex=0x7fffffb324) at /usr/src/debug/glibc/2.30-r0/git/nptl/pthread_cond_wait.c:638
#3  0x00000055559bbec4 in std::sys::unix::condvar::Condvar::wait (mutex=0x80, self=<optimized out>)
    at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/sys/unix/condvar.rs:69
#4  std::sys_common::condvar::Condvar::wait (mutex=0x5555c6afa0, self=<optimized out>) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/sys_common/condvar.rs:41
#5  std::sync::condvar::Condvar::wait (self=0x5555c67f68, guard=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/sync/condvar.rs:204
#6  futures::task_impl::std::ThreadNotify::park (self=0x5555c67f50) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/task_impl/std/mod.rs:508
#7  0x00000055555e878c in futures::task_impl::std::<impl futures::task_impl::Spawn<F>>::wait_future::{{closure}} (notify=0x7ff7ff28a8)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/task_impl/std/mod.rs:232
#8  futures::task_impl::std::ThreadNotify::with_current::{{closure}} (notify=0x7ff7ff28a8)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/task_impl/std/mod.rs:478
#9  std::thread::local::LocalKey<T>::try_with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:262
#10 std::thread::local::LocalKey<T>::with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:239
#11 0x0000005555611984 in futures::task_impl::std::ThreadNotify::with_current (f=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/task_impl/std/mod.rs:478
#12 futures::task_impl::std::<impl futures::task_impl::Spawn<F>>::wait_future (self=0x7fffffb508)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/task_impl/std/mod.rs:228
#13 futures::future::Future::wait (self=...) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/future/mod.rs:299
#14 0x00000055555ee54c in tokio::runtime::Runtime::block_on (self=<optimized out>, future=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-0.1.11/src/runtime/mod.rs:365
#15 0x00000055555e42a8 in iotedge::run () at iotedge/src/main.rs:300
#16 0x00000055555e1544 in iotedge::main () at iotedge/src/main.rs:25

Backtrace of thread 2:

(gdb) bt
#0  0x0000007ff7bfcf38 in __GI_epoll_pwait (epfd=3, events=0x5555bc0fb0, maxevents=1024, timeout=-1, set=set@entry=0x0)
    at /usr/src/debug/glibc/2.30-r0/git/sysdeps/unix/sysv/linux/epoll_pwait.c:42
#1  0x0000007ff7bfd088 in epoll_wait (epfd=<optimized out>, events=<optimized out>, maxevents=<optimized out>, timeout=<optimized out>)
    at /usr/src/debug/glibc/2.30-r0/git/sysdeps/unix/sysv/linux/epoll_wait.c:32
#2  0x00000055559a85ec in mio::sys::unix::epoll::Selector::select (self=<optimized out>, evts=0x7ff7a81570, awakener=..., timeout=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/mio-0.6.14/src/sys/unix/epoll.rs:72
#3  0x00000055559a749c in mio::poll::Poll::poll2 (self=0x5555bbfd80, events=0x7ff7a81570, timeout=..., interruptible=false)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/mio-0.6.14/src/poll.rs:1173
#4  mio::poll::Poll::poll1 (self=0x5555bbfd80, events=0x7ff7a81570, timeout=..., interruptible=false)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/mio-0.6.14/src/poll.rs:1137
#5  0x00000055559a7180 in mio::poll::Poll::poll (self=0xfffffffffffffffc, events=0x5555bc0fb0, timeout=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/mio-0.6.14/src/poll.rs:1008
#6  0x00000055559966f4 in tokio_reactor::Reactor::poll (self=0x7ff7a81570, max_wait=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-reactor-0.1.1/src/lib.rs:328
#7  tokio_reactor::Reactor::turn (self=<optimized out>, max_wait=...) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-reactor-0.1.1/src/lib.rs:301
#8  0x0000005555999224 in tokio_reactor::background::run (reactor=..., shared=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-reactor-0.1.1/src/background.rs:205
#9  0x0000005555997a1c in tokio_reactor::background::Background::new::{{closure}} ()
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-reactor-0.1.1/src/background.rs:77
#10 std::sys_common::backtrace::__rust_begin_short_backtrace (f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/sys_common/backtrace.rs:129
#11 0x0000005555997d4c in std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}} () at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/mod.rs:469
#12 <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once (self=..., _args=<optimized out>)
    at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panic.rs:317
#13 std::panicking::try::do_call (data=<optimized out>) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panicking.rs:287
#14 0x0000005555a1fe08 in __rust_maybe_catch_panic ()
#15 0x0000005555998014 in std::panicking::try (f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panicking.rs:265
#16 std::panic::catch_unwind (f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panic.rs:396
#17 std::thread::Builder::spawn_unchecked::{{closure}} () at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/mod.rs:468
#18 core::ops::function::FnOnce::call_once{{vtable-shim}} () at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libcore/ops/function.rs:227
#19 0x0000005555a19aa0 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once ()
#20 0x0000005555a19aa0 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once ()
#21 0x0000005555a19aa0 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once ()
^^^ many repeats

Backtrace of thread 8:

(gdb) bt
#0  0x0000007ff7cb24ec in futex_wait_cancelable (private=0, expected=0, futex_word=0x5555bbf80c) at /usr/src/debug/glibc/2.30-r0/git/sysdeps/unix/sysv/linux/futex-internal.h:80
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7fdc0235b0, cond=0x5555bbf7e0) at /usr/src/debug/glibc/2.30-r0/git/nptl/pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x5555bbf7e0, mutex=0x7fdc0235b0) at /usr/src/debug/glibc/2.30-r0/git/nptl/pthread_cond_wait.c:638
#3  0x000000555599aa64 in std::sys::unix::condvar::Condvar::wait (mutex=0x80, self=<optimized out>)
    at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/sys/unix/condvar.rs:69
#4  std::sys_common::condvar::Condvar::wait (mutex=0x5555bb7ff0, self=<optimized out>) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/sys_common/condvar.rs:41
#5  std::sync::condvar::Condvar::wait (self=<optimized out>, guard=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/sync/condvar.rs:204
#6  tokio_threadpool::park::default_park::Inner::park (self=0x5555bbf830, timeout=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/park/default_park.rs:133
#7  0x000000555599a87c in <tokio_threadpool::park::default_park::DefaultPark as tokio_executor::park::Park>::park (self=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/park/default_park.rs:79
#8  0x000000555598cddc in <tokio_timer::timer::Timer<T,N> as tokio_executor::park::Park>::park (self=0x5555bbf370)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-timer-0.2.6/src/timer/mod.rs:371
#9  0x000000555598f230 in <tokio_threadpool::park::boxed::BoxedPark<T> as tokio_executor::park::Park>::park (self=0x5555bbf80c)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/park/boxed.rs:28
#10 0x000000555599b57c in tokio_threadpool::worker::Worker::sleep (self=0x7ff6e63548)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:698
#11 tokio_threadpool::worker::Worker::run (self=0x7ff6e63548) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:274
#12 0x000000555598ce9c in tokio_timer::timer::handle::with_default (handle=<optimized out>, f=..., enter=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-timer-0.2.6/src/timer/handle.rs:81
#13 tokio::runtime::builder::Builder::build::{{closure}}::{{closure}}::{{closure}} (enter=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-0.1.11/src/runtime/builder.rs:237
#14 tokio_timer::clock::clock::with_default::{{closure}} (cell=<optimized out>) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-timer-0.2.6/src/clock/clock.rs:136
#15 std::thread::local::LocalKey<T>::try_with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:262
#16 std::thread::local::LocalKey<T>::with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:239
#17 0x000000555598cfb4 in tokio_timer::clock::clock::with_default (clock=<optimized out>, f=..., enter=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-timer-0.2.6/src/clock/clock.rs:119
#18 tokio::runtime::builder::Builder::build::{{closure}}::{{closure}} (enter=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-0.1.11/src/runtime/builder.rs:236
#19 tokio_reactor::with_default::{{closure}} (current=...) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-reactor-0.1.1/src/lib.rs:207
#20 std::thread::local::LocalKey<T>::try_with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:262
#21 std::thread::local::LocalKey<T>::with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:239
#22 0x000000555598eba4 in tokio_reactor::with_default (handle=0x62, enter=<optimized out>, f=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-reactor-0.1.1/src/lib.rs:199
#23 tokio::runtime::builder::Builder::build::{{closure}} (w=<optimized out>, enter=0x7ff6e634c0)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-0.1.11/src/runtime/builder.rs:235
#24 0x000000555599ce64 in tokio_threadpool::callback::Callback::call (self=<optimized out>, worker=0x80, enter=0x0)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/callback.rs:21
#25 tokio_threadpool::worker::Worker::do_run::{{closure}}::{{closure}} (enter=0x0)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:122
#26 tokio_executor::global::with_default::{{closure}} (cell=0x7ff6e64710) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-executor-0.1.5/src/global.rs:192
#27 std::thread::local::LocalKey<T>::try_with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:262
#28 std::thread::local::LocalKey<T>::with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:239
#29 0x000000555599d238 in tokio_executor::global::with_default (executor=0x7ff6e634b8, enter=0x7ff6e634c0, f=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-executor-0.1.5/src/global.rs:162
#30 tokio_threadpool::worker::Worker::do_run::{{closure}} (c=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:120
#31 std::thread::local::LocalKey<T>::try_with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:262
#32 std::thread::local::LocalKey<T>::with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:239
#33 0x00000055559a0794 in tokio_threadpool::worker::Worker::do_run (self=0x7ff6e63548)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:111
#34 tokio_threadpool::pool::Pool::spawn_thread::{{closure}} () at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/pool/mod.rs:413
#35 std::sys_common::backtrace::__rust_begin_short_backtrace (f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/sys_common/backtrace.rs:129
#36 0x000000555599d7bc in std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}} () at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/mod.rs:469
#37 <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once (self=..., _args=<optimized out>)
    at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panic.rs:317
#38 std::panicking::try::do_call (data=<optimized out>) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panicking.rs:287
#39 0x0000005555a1fe08 in __rust_maybe_catch_panic ()
#40 0x000000555599a444 in std::panicking::try (f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panicking.rs:265
#41 std::panic::catch_unwind (f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panic.rs:396
#42 std::thread::Builder::spawn_unchecked::{{closure}} () at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/mod.rs:468
#43 core::ops::function::FnOnce::call_once{{vtable-shim}} () at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libcore/ops/function.rs:227
#44 0x0000005555a19aa0 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once ()
#45 0x0000005555a19aa0 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once ()
#46 0x0000005555a19aa0 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once ()
^^^ many repeats

Backtrace of thread 9:

(gdb) bt
#0  0x0000007ff7cb24ec in futex_wait_cancelable (private=0, expected=0, futex_word=0x5555bb7f2c) at /usr/src/debug/glibc/2.30-r0/git/sysdeps/unix/sysv/linux/futex-internal.h:80
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5555bcb400, cond=0x5555bb7f00) at /usr/src/debug/glibc/2.30-r0/git/nptl/pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x5555bb7f00, mutex=0x5555bcb400) at /usr/src/debug/glibc/2.30-r0/git/nptl/pthread_cond_wait.c:638
#3  0x000000555599aa64 in std::sys::unix::condvar::Condvar::wait (mutex=0x80, self=<optimized out>)
    at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/sys/unix/condvar.rs:69
#4  std::sys_common::condvar::Condvar::wait (mutex=0x5555bbc040, self=<optimized out>) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/sys_common/condvar.rs:41
#5  std::sync::condvar::Condvar::wait (self=<optimized out>, guard=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/sync/condvar.rs:204
#6  tokio_threadpool::park::default_park::Inner::park (self=0x5555bb9350, timeout=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/park/default_park.rs:133
#7  0x000000555599a87c in <tokio_threadpool::park::default_park::DefaultPark as tokio_executor::park::Park>::park (self=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/park/default_park.rs:79
#8  0x000000555598cddc in <tokio_timer::timer::Timer<T,N> as tokio_executor::park::Park>::park (self=0x5555bb8030)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-timer-0.2.6/src/timer/mod.rs:371
#9  0x000000555598f230 in <tokio_threadpool::park::boxed::BoxedPark<T> as tokio_executor::park::Park>::park (self=0x5555bb7f2c)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/park/boxed.rs:28
#10 0x000000555599b57c in tokio_threadpool::worker::Worker::sleep (self=0x7ff6a01548)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:698
#11 tokio_threadpool::worker::Worker::run (self=0x7ff6a01548) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:274
#12 0x000000555598ce9c in tokio_timer::timer::handle::with_default (handle=<optimized out>, f=..., enter=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-timer-0.2.6/src/timer/handle.rs:81
#13 tokio::runtime::builder::Builder::build::{{closure}}::{{closure}}::{{closure}} (enter=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-0.1.11/src/runtime/builder.rs:237
#14 tokio_timer::clock::clock::with_default::{{closure}} (cell=<optimized out>) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-timer-0.2.6/src/clock/clock.rs:136
#15 std::thread::local::LocalKey<T>::try_with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:262
#16 std::thread::local::LocalKey<T>::with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:239
#17 0x000000555598cfb4 in tokio_timer::clock::clock::with_default (clock=<optimized out>, f=..., enter=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-timer-0.2.6/src/clock/clock.rs:119
#18 tokio::runtime::builder::Builder::build::{{closure}}::{{closure}} (enter=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-0.1.11/src/runtime/builder.rs:236
#19 tokio_reactor::with_default::{{closure}} (current=...) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-reactor-0.1.1/src/lib.rs:207
#20 std::thread::local::LocalKey<T>::try_with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:262
#21 std::thread::local::LocalKey<T>::with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:239
#22 0x000000555598eba4 in tokio_reactor::with_default (handle=0x62, enter=<optimized out>, f=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-reactor-0.1.1/src/lib.rs:199
#23 tokio::runtime::builder::Builder::build::{{closure}} (w=<optimized out>, enter=0x7ff6a014c0)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-0.1.11/src/runtime/builder.rs:235
#24 0x000000555599ce64 in tokio_threadpool::callback::Callback::call (self=<optimized out>, worker=0x80, enter=0x0)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/callback.rs:21
#25 tokio_threadpool::worker::Worker::do_run::{{closure}}::{{closure}} (enter=0x0)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:122
#26 tokio_executor::global::with_default::{{closure}} (cell=0x7ff6a02710) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-executor-0.1.5/src/global.rs:192
#27 std::thread::local::LocalKey<T>::try_with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:262
#28 std::thread::local::LocalKey<T>::with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:239
#29 0x000000555599d238 in tokio_executor::global::with_default (executor=0x7ff6a014b8, enter=0x7ff6a014c0, f=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-executor-0.1.5/src/global.rs:162
#30 tokio_threadpool::worker::Worker::do_run::{{closure}} (c=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:120
#31 std::thread::local::LocalKey<T>::try_with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:262
#32 std::thread::local::LocalKey<T>::with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:239
#33 0x00000055559a0794 in tokio_threadpool::worker::Worker::do_run (self=0x7ff6a01548)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:111
#34 tokio_threadpool::pool::Pool::spawn_thread::{{closure}} () at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/pool/mod.rs:413
#35 std::sys_common::backtrace::__rust_begin_short_backtrace (f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/sys_common/backtrace.rs:129
#36 0x000000555599d7bc in std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}} () at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/mod.rs:469
#37 <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once (self=..., _args=<optimized out>)
    at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panic.rs:317
#38 std::panicking::try::do_call (data=<optimized out>) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panicking.rs:287
#39 0x0000005555a1fe08 in __rust_maybe_catch_panic ()
#40 0x000000555599a444 in std::panicking::try (f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panicking.rs:265
#41 std::panic::catch_unwind (f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panic.rs:396
#42 std::thread::Builder::spawn_unchecked::{{closure}} () at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/mod.rs:468
#43 core::ops::function::FnOnce::call_once{{vtable-shim}} () at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libcore/ops/function.rs:227
#44 0x0000005555a19aa0 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once ()
#45 0x0000005555a19aa0 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once ()
#46 0x0000005555a19aa0 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once ()
^^^ many repeats

Backtrace of thread 10:

(gdb) bt
#0  0x0000007ff7cb24ec in futex_wait_cancelable (private=0, expected=0, futex_word=0x5555bbf318) at /usr/src/debug/glibc/2.30-r0/git/sysdeps/unix/sysv/linux/futex-internal.h:80
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7fdc014c90, cond=0x5555bbf2f0) at /usr/src/debug/glibc/2.30-r0/git/nptl/pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x5555bbf2f0, mutex=0x7fdc014c90) at /usr/src/debug/glibc/2.30-r0/git/nptl/pthread_cond_wait.c:638
#3  0x000000555599aa64 in std::sys::unix::condvar::Condvar::wait (mutex=0x80, self=<optimized out>)
    at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/sys/unix/condvar.rs:69
#4  std::sys_common::condvar::Condvar::wait (mutex=0x5555bbf2b0, self=<optimized out>) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/sys_common/condvar.rs:41
#5  std::sync::condvar::Condvar::wait (self=<optimized out>, guard=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/sync/condvar.rs:204
#6  tokio_threadpool::park::default_park::Inner::park (self=0x5555bbf340, timeout=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/park/default_park.rs:133
#7  0x000000555599a87c in <tokio_threadpool::park::default_park::DefaultPark as tokio_executor::park::Park>::park (self=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/park/default_park.rs:79
#8  0x000000555598cddc in <tokio_timer::timer::Timer<T,N> as tokio_executor::park::Park>::park (self=0x5555bb89f0)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-timer-0.2.6/src/timer/mod.rs:371
#9  0x000000555598f230 in <tokio_threadpool::park::boxed::BoxedPark<T> as tokio_executor::park::Park>::park (self=0x5555bbf318)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/park/boxed.rs:28
#10 0x000000555599b57c in tokio_threadpool::worker::Worker::sleep (self=0x7ff6c02548)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:698
#11 tokio_threadpool::worker::Worker::run (self=0x7ff6c02548) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:274
#12 0x000000555598ce9c in tokio_timer::timer::handle::with_default (handle=<optimized out>, f=..., enter=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-timer-0.2.6/src/timer/handle.rs:81
#13 tokio::runtime::builder::Builder::build::{{closure}}::{{closure}}::{{closure}} (enter=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-0.1.11/src/runtime/builder.rs:237
#14 tokio_timer::clock::clock::with_default::{{closure}} (cell=<optimized out>) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-timer-0.2.6/src/clock/clock.rs:136
#15 std::thread::local::LocalKey<T>::try_with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:262
#16 std::thread::local::LocalKey<T>::with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:239
#17 0x000000555598cfb4 in tokio_timer::clock::clock::with_default (clock=<optimized out>, f=..., enter=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-timer-0.2.6/src/clock/clock.rs:119
#18 tokio::runtime::builder::Builder::build::{{closure}}::{{closure}} (enter=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-0.1.11/src/runtime/builder.rs:236
#19 tokio_reactor::with_default::{{closure}} (current=...) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-reactor-0.1.1/src/lib.rs:207
#20 std::thread::local::LocalKey<T>::try_with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:262
#21 std::thread::local::LocalKey<T>::with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:239
#22 0x000000555598eba4 in tokio_reactor::with_default (handle=0x62, enter=<optimized out>, f=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-reactor-0.1.1/src/lib.rs:199
#23 tokio::runtime::builder::Builder::build::{{closure}} (w=<optimized out>, enter=0x7ff6c024c0)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-0.1.11/src/runtime/builder.rs:235
#24 0x000000555599ce64 in tokio_threadpool::callback::Callback::call (self=<optimized out>, worker=0x80, enter=0x0)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/callback.rs:21
#25 tokio_threadpool::worker::Worker::do_run::{{closure}}::{{closure}} (enter=0x0)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:122
#26 tokio_executor::global::with_default::{{closure}} (cell=0x7ff6c03710) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-executor-0.1.5/src/global.rs:192
#27 std::thread::local::LocalKey<T>::try_with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:262
#28 std::thread::local::LocalKey<T>::with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:239
#29 0x000000555599d238 in tokio_executor::global::with_default (executor=0x7ff6c024b8, enter=0x7ff6c024c0, f=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-executor-0.1.5/src/global.rs:162
#30 tokio_threadpool::worker::Worker::do_run::{{closure}} (c=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:120
#31 std::thread::local::LocalKey<T>::try_with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:262
#32 std::thread::local::LocalKey<T>::with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:239
#33 0x00000055559a0794 in tokio_threadpool::worker::Worker::do_run (self=0x7ff6c02548)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:111
#34 tokio_threadpool::pool::Pool::spawn_thread::{{closure}} () at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/pool/mod.rs:413
#35 std::sys_common::backtrace::__rust_begin_short_backtrace (f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/sys_common/backtrace.rs:129
#36 0x000000555599d7bc in std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}} () at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/mod.rs:469
#37 <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once (self=..., _args=<optimized out>)
    at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panic.rs:317
#38 std::panicking::try::do_call (data=<optimized out>) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panicking.rs:287
#39 0x0000005555a1fe08 in __rust_maybe_catch_panic ()
#40 0x000000555599a444 in std::panicking::try (f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panicking.rs:265
#41 std::panic::catch_unwind (f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panic.rs:396
#42 std::thread::Builder::spawn_unchecked::{{closure}} () at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/mod.rs:468
#43 core::ops::function::FnOnce::call_once{{vtable-shim}} () at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libcore/ops/function.rs:227
#44 0x0000005555a19aa0 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once ()
#45 0x0000005555a19aa0 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once ()
#46 0x0000005555a19aa0 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once ()
^^^ many repeats

@Lexmark-chad
Copy link
Author

This likely isn't helpful, but a colleague of mine who is well versed in Rust helped me to set breakpoints to navigate back up through the stack to try to get a better callstack. This is as far as I could get:

Thread 9 "tokio-runtime-w" hit Breakpoint 1, 0x0000005555a36c10 in core::str::slice_error_fail ()
(gdb) bt
#0  0x0000005555a36c10 in core::str::slice_error_fail ()
#1  0x000000555583acc0 in core::str::traits::<impl core::slice::SliceIndex<str> for core::ops::range::Range<usize>>::index::{{closure}} ()
    at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libcore/str/mod.rs:1792
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

@arsing
Copy link
Member

arsing commented Oct 22, 2020

Thread 2 parked in epoll and the other threads parked on condvars is to be expected; they're tokio's I/O reactor thread and the other worker threads, and the worker threads have nothing to do. The relevant one is thread 7, and it's annoying that its stack is corrupted. (It is surprising that the other threads also don't have proper stacks after frame 44.)

You might get a better stack with break abort so that the stack is captured before the signal fires. Or break src/libcore/str/mod.rs:2051 or break slice_error_fail which is the function that's raising the panic.

@arsing
Copy link
Member

arsing commented Oct 22, 2020

Okay, so if break slice_error_fail also has a corrupted stack that is annoying...

@Lexmark-chad
Copy link
Author

This time I set a breakpoint on mod.rs:1792..... progress?

(gdb) bt
#0  core::str::traits::<impl core::slice::SliceIndex<str> for core::ops::range::Range<usize>>::index::{{closure}} ()
    at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libcore/str/mod.rs:1792
#1  0x000000555583c390 in sysinfo::linux::component::append_files (components=0x7ff6e560d0, 
    folder=<error reading variable: access outside bounds of object referenced via synthetic pointer>)
    at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/liballoc/raw_vec.rs:102
#2  sysinfo::linux::component::get_components () at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/sysinfo-0.9.6/src/linux/component.rs:157
#3  0x00000055558301c4 in <sysinfo::linux::system::System as sysinfo::traits::SystemExt>::new_with_specifics (refreshes=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/sysinfo-0.9.6/src/linux/system.rs:136
#4  0x000000555568cd50 in sysinfo::traits::SystemExt::new () at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/sysinfo-0.9.6/src/traits.rs:115
#5  iotedge::check::additional_info::SystemInfo::new () at iotedge/src/check/additional_info.rs:214
#6  iotedge::check::additional_info::AdditionalInfo::new () at iotedge/src/check/additional_info.rs:26
#7  0x00000055555fa388 in iotedge::check::Check::new::{{closure}} (latest_versions=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/iotedge-1.0.9.4/edgelet/iotedge/src/check/mod.rs:208
#8  <futures::future::then::Then<A,B,F> as futures::future::Future>::poll::{{closure}} (a=..., f=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/future/then.rs:33
#9  futures::future::chain::Chain<A,B,C>::poll (self=0x5555ca24d8, f=...) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/future/chain.rs:39
#10 0x00000055555f4e40 in <futures::future::then::Then<A,B,F> as futures::future::Future>::poll (self=0x5555ca24d8)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/future/then.rs:32
#11 <futures::future::either::Either<A,B> as futures::future::Future>::poll (self=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/future/either.rs:36
#12 futures::future::chain::Chain<A,B,C>::poll (self=0x5555ca24c8, f=...) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/future/chain.rs:26
#13 0x00000055555f595c in <futures::future::and_then::AndThen<A,B,F> as futures::future::Future>::poll (self=0x5555ca24c8)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/future/and_then.rs:32
#14 futures::future::chain::Chain<A,B,C>::poll (self=0x5555ca24c0, f=...) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/future/chain.rs:26
#15 0x000000555599d830 in <alloc::boxed::Box<F> as futures::future::Future>::poll (self=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/future/mod.rs:113
#16 futures::task_impl::Spawn<T>::poll_future_notify::{{closure}} (f=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/task_impl/mod.rs:314
#17 futures::task_impl::Spawn<T>::enter::{{closure}} () at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/task_impl/mod.rs:388
#18 futures::task_impl::std::set (task=0x7ff6e63098, f=...) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/task_impl/std/mod.rs:78
#19 0x000000555599d76c in futures::task_impl::Spawn<T>::enter (self=0x7ff6e56870, unpark=..., f=...)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/task_impl/mod.rs:388
#20 futures::task_impl::Spawn<T>::poll_future_notify (self=0x7ff6e56870, id=<optimized out>, notify=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/futures-0.1.24/src/task_impl/mod.rs:314
#21 tokio_threadpool::task::Task::run::{{closure}} () at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/task/mod.rs:127
#22 core::ops::function::FnOnce::call_once () at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libcore/ops/function.rs:227
#23 <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once (self=..., _args=<optimized out>)
    at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panic.rs:317
#24 std::panicking::try::do_call (data=0x7ff6e63138 "01\346\366\177\000") at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panicking.rs:287
#25 0x0000005555a1fe08 in __rust_maybe_catch_panic ()
#26 0x000000555599d4c4 in std::panicking::try (f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panicking.rs:265
#27 std::panic::catch_unwind (f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panic.rs:396
#28 tokio_threadpool::task::Task::run (self=<optimized out>, unpark=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/task/mod.rs:113
#29 0x000000555599bb98 in tokio_threadpool::worker::Worker::run_task2 (self=<optimized out>, task=0x7ff6e631b0, notify=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:550
#30 tokio_threadpool::worker::Worker::run_task (self=0x7ff6e63548, task=..., notify=0x7fdc0008d0)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:451
#31 0x000000555599b1a0 in tokio_threadpool::worker::Worker::try_steal_task (self=0x7ff6e63548, notify=0x7ff6e63248)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:418
#32 tokio_threadpool::worker::Worker::try_run_task (self=0x7ff6e63548, notify=0x7ff6e63248)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:303
#33 tokio_threadpool::worker::Worker::run (self=0x7ff6e63548) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:240
#34 0x000000555598ce9c in tokio_timer::timer::handle::with_default (handle=<optimized out>, f=..., enter=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-timer-0.2.6/src/timer/handle.rs:81
#35 tokio::runtime::builder::Builder::build::{{closure}}::{{closure}}::{{closure}} (enter=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-0.1.11/src/runtime/builder.rs:237
#36 tokio_timer::clock::clock::with_default::{{closure}} (cell=<optimized out>) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-timer-0.2.6/src/clock/clock.rs:136
#37 std::thread::local::LocalKey<T>::try_with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:262
#38 std::thread::local::LocalKey<T>::with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:239
#39 0x000000555598cfb4 in tokio_timer::clock::clock::with_default (clock=<optimized out>, f=..., enter=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-timer-0.2.6/src/clock/clock.rs:119
#40 tokio::runtime::builder::Builder::build::{{closure}}::{{closure}} (enter=<optimized out>)
    at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-0.1.11/src/runtime/builder.rs:236
#41 tokio_reactor::with_default::{{closure}} (current=...) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-reactor-0.1.1/src/lib.rs:207
--Type <RET> for more, q to quit, c to continue without paging--c
#42 std::thread::local::LocalKey<T>::try_with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:262
#43 std::thread::local::LocalKey<T>::with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:239
#44 0x000000555598eba4 in tokio_reactor::with_default (handle=0x7ff6e56870, enter=<optimized out>, f=...) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-reactor-0.1.1/src/lib.rs:199
#45 tokio::runtime::builder::Builder::build::{{closure}} (w=<optimized out>, enter=0x7ff6e634c0) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-0.1.11/src/runtime/builder.rs:235
#46 0x000000555599ce64 in tokio_threadpool::callback::Callback::call (self=<optimized out>, worker=0x4, enter=0x7fdc0008d0) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/callback.rs:21
#47 tokio_threadpool::worker::Worker::do_run::{{closure}}::{{closure}} (enter=0x7fdc0008d0) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:122
#48 tokio_executor::global::with_default::{{closure}} (cell=0x7ff6e64710) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-executor-0.1.5/src/global.rs:192
#49 std::thread::local::LocalKey<T>::try_with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:262
#50 std::thread::local::LocalKey<T>::with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:239
#51 0x000000555599d238 in tokio_executor::global::with_default (executor=0x7ff6e634b8, enter=0x7ff6e634c0, f=...) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-executor-0.1.5/src/global.rs:162
#52 tokio_threadpool::worker::Worker::do_run::{{closure}} (c=<optimized out>) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:120
#53 std::thread::local::LocalKey<T>::try_with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:262
#54 std::thread::local::LocalKey<T>::with (self=<optimized out>, f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/local.rs:239
#55 0x00000055559a0794 in tokio_threadpool::worker::Worker::do_run (self=0x7ff6e63548) at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/worker/mod.rs:111
#56 tokio_threadpool::pool::Pool::spawn_thread::{{closure}} () at /usr/src/debug/iotedge-cli/1.0.9.4-r0/cargo_home/bitbake/tokio-threadpool-0.1.6/src/pool/mod.rs:413
#57 std::sys_common::backtrace::__rust_begin_short_backtrace (f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/sys_common/backtrace.rs:129
#58 0x000000555599d7bc in std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}} () at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/mod.rs:469
#59 <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once (self=..., _args=<optimized out>) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panic.rs:317
#60 std::panicking::try::do_call (data=<optimized out>) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panicking.rs:287
#61 0x0000005555a1fe08 in __rust_maybe_catch_panic ()
#62 0x000000555599a444 in std::panicking::try (f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panicking.rs:265
#63 std::panic::catch_unwind (f=...) at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/panic.rs:396
#64 std::thread::Builder::spawn_unchecked::{{closure}} () at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libstd/thread/mod.rs:468
#65 core::ops::function::FnOnce::call_once{{vtable-shim}} () at /usr/src/debug/libstd-rs/1.40.0-r0/rustc-1.40.0-src/src/libcore/ops/function.rs:227
#66 0x0000005555a19aa0 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once ()
#67 0x0000005555a19aa0 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once ()
#68 0x0000005555a19aa0 in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once ()

@arsing
Copy link
Member

arsing commented Oct 22, 2020

That is excellent! Let me check what sysinfo 0.9.6 is doing.

@arsing
Copy link
Member

arsing commented Oct 22, 2020

Okay, so https://docs.rs/sysinfo/0.9.6/src/sysinfo/linux/component.rs.html#51 is the problem. entry there could be "temp", and indexing it with 4..5 will indeed panic. In #2747 the issue was probably caused by line 46, due to indexing "temp1" with 6..

It was fixed by GuillaumeGomez/sysinfo@01e0c73 which was made just after 0.9.6 was released. It is in 0.10.0 - https://docs.rs/sysinfo/0.10.0/src/sysinfo/linux/component.rs.html#66

In our 1.0.10 we've updated the dependency to 0.12.0, so it should be fixed there.

@Lexmark-chad
Copy link
Author

Awesome. I think you nailed it. I was chatting in real-time with @srwalter and he pointed out the following:

root@granite2v8:~# ls /sys/class/hwmon/hwmon0
device           name             of_node          power            subsystem        temp1_crit       temp1_input      temp1_max_alarm  uevent

I can try updating that crate first as a quick fix. We have plans to move to 1.0.10, but will that will take a bit more time. Thanks for all your help!

@arsing
Copy link
Member

arsing commented Oct 22, 2020

That also explains why both iotedge check and Edge Agent 1.0.10 on iotedged 1.0.9 trigger it; the code to use the sysinfo crate is only invoked by those two. For iotedge check it's part of gathering additional info, and for Edge Agent it's because it started invoking the /systeminfo/resources endpoint for collecting metrics.

So please update iotedged to 1.0.10 and see if the issue is resolved.

@arsing
Copy link
Member

arsing commented Oct 22, 2020

Your hwmon0 listing doesn't have any files that would cause the problem. Do you have any other hwmon devices that have a file named just temp ? That file would be the one causing the panic.

@Lexmark-chad
Copy link
Author

Sorry, wasn't paying close enough attention. Yes, there is also an hwmon1 that has just 'temp'.

@Lexmark-chad
Copy link
Author

Are you sure 1.0.10 is updated to sysinfo 0.12.0?

https://github.com/Azure/iotedge/blob/release/1.0.10/edgelet/iotedge/Cargo.toml

I've successfully built 1.0.10, but I'm crashing in the same place. Please note that I'm still using the prior pinned version of Rust in the build and I'm working on bringing that up to Rust 1.44.1.

@Lexmark-chad
Copy link
Author

fyi. I patched the above file to pin sysinfo to version 0.12.0 and 'iotedge check' now successfully runs on our platform.

@github-actions
Copy link

This issue is being marked as stale because it has been open for 30 days with no activity.

@arsing
Copy link
Member

arsing commented Jan 20, 2021

Are you sure 1.0.10 is updated to sysinfo 0.12.0?

https://github.com/Azure/iotedge/blob/release/1.0.10/edgelet/iotedge/Cargo.toml

Looks like we updated iotedged ( https://github.com/Azure/iotedge/blob/release/1.0.10/edgelet/edgelet-docker/Cargo.toml#L20 ) but not iotedge

@arsing arsing added 1.0.10 Targeted for 1.0.10 bug Something isn't working and removed no-issue-activity labels Jan 20, 2021
kodiakhq bot pushed a commit that referenced this issue Feb 25, 2021
This change upgrades the sysinfo package in the iotedge CLI and iotedged. It fixes bugs called out in #2747 and #3746. This change was fixed in master earlier and was supposed to by ported to the 1.1 branch, but never was.
darobs pushed a commit to darobs/iotedge that referenced this issue Mar 3, 2021
This change upgrades the sysinfo package in the iotedge CLI and iotedged. It fixes bugs called out in Azure#2747 and Azure#3746. This change was fixed in master earlier and was supposed to by ported to the 1.1 branch, but never was.
darobs added a commit that referenced this issue Mar 3, 2021
* Fix GetModules call error using RFC3339 DateTime format. (#4293)

Fix issue calling GetModuleLogs using DirectMethod with a payload that contains parameters using RF3339 DateTime format.

* Prepare for release 1.1.0 (#4342)

* Update nuget config per security recommendations (#4289)

* Set IOTEDGE_HOST before 'make install' (#4396)

After commit a34e0ed, the iotedge CLI fails in Mariner because IOTEDGE_HOST was not set during compilation, so the CLI has the wrong path to iotedged's management endpoint.

To fix this, we set IOTEDGE_HOST prior to running `make install`. It was already being set prior to `make release`.

* Update Base Images for Security Vulnerability 3.1.12 (#4380)

- Update ARM32/ARM64 Bionic base images to 3.1.12
- Update AMD64 (Linux) Alpine base images to 3.1.12
- Update AMD64 (Windows) Nanoserver base images to 3.1.12

* Update release 1.1.0 (#4399)

Update the CHANGELOG to include the latest commits.

* Config yaml 1.1 (#4434)

This change updates the default agent tag in config.yaml to 1.1.

Cherry-pick a4faab5 and update 1.1-specific Windows config.yaml.

* Upgrade sysinfo package (#4444)

This change upgrades the sysinfo package in the iotedge CLI and iotedged. It fixes bugs called out in #2747 and #3746. This change was fixed in master earlier and was supposed to by ported to the 1.1 branch, but never was.

* EFLOW: Introduce environment variables for nuget operations (#4499)

Set env variables to direct nuget caches to the data partition instead of to the rootfs

Co-authored-by: Pedro Marcelo Zara <pmzara@hotmail.com>
Co-authored-by: Damon Barry <damonbarry@users.noreply.github.com>
Co-authored-by: yophilav <54859653+yophilav@users.noreply.github.com>
Co-authored-by: ms-mahuber <60939654+ms-mahuber@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0.10 Targeted for 1.0.10 bug Something isn't working customer-reported iotedge
Projects
None yet
Development

No branches or pull requests

5 participants