This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PROCESSOR-SDK-AM335X: AM335X

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

Linux Kernel is not shutting down.

AM335X processor

Kernel: 3.12.10

128 MB RAM

256 MB Flash

Hung session ended with this kernel statement:

    UBIFS: background thread "ubifs_bgt0_0" stops

In every successful power down we also receive this message:

    reboot: Power down

In this state the hardwired wakeup line does not restart the TI processor, so it must be somewhere in power down.

If we remove power the device restarts and everything appears normal.

I have added several printf’s to the kernel and power down scripts for more visibility of what might be hanging up. The items in green are added.

 [Wed Jun 28 09:10:56.095 2017] Sending all processes the KILL signal...

[Wed Jun 28 09:10:56.195 2017] Unmounting remote filesystems...

[Wed Jun 28 09:10:56.225 2017] Deactivating swap...

[Wed Jun 28 09:10:56.235 2017] Unmounting local filesystems...

[Wed Jun 28 09:10:56.245 2017] mount read only...

[Wed Jun 28 09:10:56.265 2017] [   56.413524] UBIFS: background thread "ubifs_bgt0_0" stops

[Wed Jun 28 09:10:56.265 2017] umount -f ...

[Wed Jun 28 09:10:56.285 2017] calling exit 0...

         TWO SECONDS unaccounted - where is this?

[Wed Jun 28 09:10:58.318 2017] [   58.465879] SYSC_reboot: begin

[Wed Jun 28 09:10:58.318 2017] [   58.467592] SYSC_reboot: ns_capable()

[Wed Jun 28 09:10:58.318 2017] [   58.469680] SYSC_reboot: reboot_pid_ns()

[Wed Jun 28 09:10:58.328 2017] [   58.471832] SYSC_reboot: mutex_lock(reboot_mutex)

[Wed Jun 28 09:10:58.328 2017] [   58.474411] SYSC_reboot: mutex_unlock(reboot_mutex)

[Wed Jun 28 09:10:58.328 2017] [   58.477082] SYSC_reboot: mutex_unlock(reboot_mutex) DONE

[Wed Jun 28 09:10:58.338 2017] [   58.480400] SYSC_reboot: begin

[Wed Jun 28 09:10:58.338 2017] [   58.482141] SYSC_reboot: ns_capable()

[Wed Jun 28 09:10:58.338 2017] [   58.484150] SYSC_reboot: reboot_pid_ns()

[Wed Jun 28 09:10:58.338 2017] [   58.486300] SYSC_reboot: mutex_lock(reboot_mutex)

[Wed Jun 28 09:10:58.338 2017] [   58.488931] SYSC_reboot: kernel_power_off()

[Wed Jun 28 09:10:58.348 2017] [   58.491227] kernel_power_off: [begin]

[Wed Jun 28 09:10:58.348 2017] [   58.493234] kernel_power_off: kernel_shutdown_prepare()

[Wed Jun 28 09:10:58.348 2017] [   58.496096] kernel_shutdown_prepare: [begin]

[Wed Jun 28 09:10:58.348 2017] [   58.498463] kernel_shutdown_prepare: blocking_notifier_call_chain()

[Wed Jun 28 09:10:58.348 2017] [   58.501917] kernel_shutdown_prepare: usermodehelper_disable()

[Wed Jun 28 09:10:58.358 2017] [   58.505066] kernel_shutdown_prepare: device_shutdown()

[Wed Jun 28 09:10:58.368 2017] [   58.518591] kernel_shutdown_prepare: [end]

[Wed Jun 28 09:10:58.368 2017] [   58.520911] kernel_power_off: migrate_to_reboot()

[Wed Jun 28 09:10:58.368 2017] [   58.523492] migrate_to_reboot_cpu: [begin]

[Wed Jun 28 09:10:58.368 2017] [   58.525737] migrate_to_reboot_cpu: cpu_hotplug_disable()

[Wed Jun 28 09:10:58.378 2017] [   58.528681] migrate_to_reboot_cpu: set_cpus_allowed_ptr()

[Wed Jun 28 09:10:58.378 2017] [   58.531640] migrate_to_reboot_cpu: [end]

[Wed Jun 28 09:10:58.388 2017] [   58.533789] kernel_power_off: syscore_shutdown()

[Wed Jun 28 09:10:58.388 2017] [   58.536318] syscore_shutdown: [begin]

[Wed Jun 28 09:10:58.388 2017] [   58.538344] syscore_shutdown: lock acquired

[Wed Jun 28 09:10:58.388 2017] [   58.540672] syscore_shutdown: PM: Calling ledtrig_cpu_syscore_shutdown+0x0/0x14

[Wed Jun 28 09:10:58.388 2017] [   58.544696] syscore_shutdown: PM: Calling irq_gc_shutdown+0x0/0x5c

[Wed Jun 28 09:10:58.398 2017] [   58.548102] syscore_shutdown: loop completed

[Wed Jun 28 09:10:58.398 2017] [   58.550443] syscore_shutdown: lock release

[Wed Jun 28 09:10:58.408 2017] [   58.552687] syscore_shutdown: [end]

[Wed Jun 28 09:10:58.408 2017] [   58.554597] reboot: Power down

What is happening during the 2 seconds between the  ubifs_bgt0_0 stops and reboot: Power down

  • Hi Jim,

    I need to clarify some things first.

    Jim Davis4 said:
    Linux Kernel is not shutting down.

    Do you use "shutdown" command or "poweroff" command?

    Jim Davis4 said:
    AM335X processor

    Do you use AM335x custom board? This issue might be hardware related, can you reproduce this issue on AM335x TI EVM?

    Jim Davis4 said:
    Kernel: 3.12.10

    Do you use AM335x TI SDK7 (kernel and rootfs) ?

    Jim Davis4 said:

    Hung session ended with this kernel statement:

        UBIFS: background thread "ubifs_bgt0_0" stops

    The log you sent is not very clear to me. Can you provide the full log starting from the shutdown/poweroff command till the very end?

    Regards,
    Pavel