Jetson Nano from SD card image: segfault in update-mime-info, Unity doesn't start

I installed a brand new Jetson Nano by flashing image on my 16 GB microSD card. I let the installation go through, waited for unattended upgrades to finish, then I ran one more update manually before restarting.

After restart, the system starts to suffer from many problems.

  1. apt is no longer usable, because the triggered program update-mime-info segfaults. This effectively prevents installing any other packages after the initial restart.
  2. The X server crashes before even displaying the login screen.

Here’s a stack trace of the update-mime-info:

Starting program: /usr/bin/update-mime-database /usr/share/mime

Program received signal SIGSEGV, Segmentation fault.
_dl_relocate_object (scope=0x7fb7fd40a0 <dl_main>, reloc_mode=1, consider_profiling=127, consider_profiling@entry=0) at dl-reloc.c:231
231     dl-reloc.c: No such file or directory.
(gdb) where
#0  _dl_relocate_object (scope=0x7fb7fd40a0 <dl_main>, reloc_mode=1, consider_profiling=127, consider_profiling@entry=0) at dl-reloc.c:231
#1  0x0000007fb7fd5c90 in dl_main (phdr=<optimized out>, phnum=<optimized out>, user_entry=<optimized out>, auxv=<optimized out>) at rtld.c:2190
#2  0x0000007fb7fe6c5c in _dl_sysdep_start (start_argptr=start_argptr@entry=0x7ffffff670, dl_main=dl_main@entry=0x7fb7fd40a0 <dl_main>) at ../elf/dl-sysdep.c:253
#3  0x0000007fb7fd38c4 in _dl_start_final (arg=0x7ffffff670, arg@entry=0x7fb7ffee68, info=info@entry=0x7ffffff200) at rtld.c:414
#4  0x0000007fb7fd3b48 in _dl_start (arg=0x7fb7ffee68) at rtld.c:523
#5  0x0000007fb7fd31c8 in _start () from /lib/ld-linux-aarch64.so.1
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Interesting lines from syslog:

nm-dispatcher[4582]: Segmentation fault
/usr/lib/gdm3/gdm-x-session[5123]: (--) NVIDIA(GPU-0): Panasonic-TV (DFP-0): connected
/usr/lib/gdm3/gdm-x-session[5123]: (--) NVIDIA(GPU-0): Panasonic-TV (DFP-0): External TMDS
systemd[1]: Started resolvconf-pull-resolved.service.
systemd[5069]: indicator-keyboard.service: Main process exited, code=dumped, status=11/SEGV
systemd[5069]: indicator-keyboard.service: Failed with result 'core-dump'.
compiz-profile-selector[5929]: /usr/lib/aarch64-linux-gnu/unity/compiz-profile-selector: line 48:  5980 Segmentation fault      (core dumped) /usr/lib/aarch64-linux-gnu/unity/compiz-config-profile-setter $settings_profile
systemd[5069]: unity7.service: Control process exited, code=exited status=139
systemd[5069]: unity7.service: Failed with result 'exit-code'.
systemd[5069]: Failed to start Unity Shell v7.
systemd[5069]: bamfdaemon.service: Start request repeated too quickly.
systemd[5069]: bamfdaemon.service: Failed with result 'exit-code'.
systemd[5069]: Failed to start BAMF Application Matcher Framework.
 kernel: tegradc tegradc.0: blank - powerdown
kernel: extcon-disp-state extcon:disp-state: cable 47 state 0
kernel: Extcon AUX1(HDMI) disable
kernel: tegradc tegradc.1: blank - powerdown
/usr/lib/gdm3/gdm-x-session[6315]: (II) NVIDIA(GPU-0): Deleting GPU-0
unity-panel-service[6482]: Unable to init server: Could not connect: Connection refused
unity-panel-ser[6482]: cannot open display: :0
at-spi-bus-launcher[6541]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
at-spi-bus-launcher[6541]:       after 21 requests (21 known processed) with 0 events remaining.

Hi,

Sorry in advance because I don’t know this usecase very well.
May I ask what is the purpose for update-mime-database? I don’t think we ever test such tool before.

update-mime-database is a standard part od Ubuntu installation (installed by default). I don’t think it’s needed for anything related machine learning, but it installs a hook into APT which, if it fails, breaks the whole package manager.

j.jhg,

Could you share what this tool can do? Also, could you tell us why you need to use this tool?

This sounds like a bug in our linux release.

Wayne, I don’t use update-mime-database for anything. It is a basic linux tool used for whatever it is used by the core system. If it doesn’t work, the system doesn’t work. That’s it. And yes, I think it is a distribution problem. I just wonder why I’m the only one facing this problem, even though I exactly follow the tutorials and do nothing special.

I could live without this update-mime-database (i.e. hacking it to always return 0 exit code), but the bigger problem is that Unity doesn’t start.

If you take a fresh 16 GB uSD card, flash it with https://developer.nvidia.com/embedded/dlc/jetson-nano-dev-kit-sd-card-image, wait for filesystem sync, eject the card and put it into Nano, then you just start the Nano with a display and keyboard, proceed through the initial setup, restart, and the system starts up including the graphics server? Because this is exactly what I’m doing. The SD card is class 10.

j.jhg,

I will check if any clue on my device. Could you share how you set up the device? Normally, such problem should be related to the setup procedure.

I’ve just shared the procedure in my previous post. The only step from official guide I leave out is formatting the card - because you anyway re-flash its whole contents, so formatting is irrelevant.

Hi j.jhg,

Please try below steps to check you can boot success or not.

  1. Format you SDcard:
$ sudo mkfs.ext4 /dev/sdX1
  1. Copy SDcard image from: http://developer.nvidia.com/embedded/dlc/jetson-nano-dev-kit-sd-card-image
  2. Run sdkmanager to flash your Jetson-Nano

Flashing via SDK Manager works. So it really seems that the provided image for manual flashing is faulty.

Hi j.jhg,

You can use below steps to flash image by manually:

Put Jetson device to recovery mode. 
Go to JetPack install directory: ~/nvidia/nvidia_sdk/JetPack_4.2_Linux_P3448/
cd Linux_for_Tegra
Run below command to flash Jetson device:  
$ sudo ./flash.sh jetson-nano-qspi-sd mmcblk0p1

Then it seems the tutorial https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit#write is just plainly wrong. Can you correct it, please?

The latest SD card image finally flashed correctly following the tutorial.