Anyone Ever Experienced A Crash Where Asterisk Debug Output A Line With All Nulls

Home » Asterisk Users » Anyone Ever Experienced A Crash Where Asterisk Debug Output A Line With All Nulls
Asterisk Users 6 Comments

We have a customer where their VM running Asterisk appears to have crashed. Fortunately, we had some debugging enabled. The asterisk messages file has this… (in notepad+ the blank line in the middle is all [NUL][NUL] [NUL][NUL]….)

[08/12 15:30:55.880] VERBOSE[6920] app_mixmonitor.c: Begin MixMonitor Recording CBRec/IS__a37ae004-c780-4c7f-88a9-a04402f0ab4e-0000e70f
[08/12 15:30:55.881] VERBOSE[6921] bridge_channel.c: Channel CBRec/IS__a37ae004-c780-4c7f-88a9-a04402f0ab4e-0000e70f joined ‘softmix’ base-bridge <23340bca-6823-4c70-a395-e3b092aeb671>
[08/12 15:33:02.887] Asterisk 16.2.1 built by root @ sw-genesis-build4 on a x86_64 running Linux on 2019-04-04 13:41:15 UTC

We also had debugging enabled and things were output to our debug file for 17 more seconds…. The blank line in my e-mail is once again a line with all [NUL}… (in notepad+ the blank line in the middle is all [NUL][NUL] [NUL][NUL]….)

[08/12 15:31:12.776] DEBUG[6781] audiohook.c: Read factory 0x7f079389bff8 and write factory 0x7f079389ca38 both fail to provide 160 samples
[08/12 15:31:12.777] DEBUG[6709] audiohook.c: Failed to get 160 samples from read factory 0x7f07937066d8
[08/12 15:31:12.777] DEBUG[6709] audiohook.c: Read factory 0x7f07937066d8 and write factory 0x7f0793707118 both fail to provide 160 samples
[08/12 15:33:02.915] Asterisk 16.2.1 built by root @ sw-genesis-build4 on a x86_64 running Linux on 2019-04-04 13:41:15 UTC
[Aug 12 15:33:02] DEBUG[1385] config.c: Parsing /etc/iss/asterisk/logger.conf

I believe this was bad enough that Ubuntu actually crashed, but there is nothing in the syslog indicating anything until 15:32:42 where it appears Linux is starting up.

After this situation happens, every time Asterisk starts up, it was taking significantly longer to load. Normally 1-2 seconds, became 26-28 seconds.
[08/12 15:33:03.240] NOTICE[1385] loader.c: 286 modules will be loaded.
[08/12 15:33:23.844] VERBOSE[1385] loader.c: Loading extconfig.

Loading the modules is taking 20 seconds after this incident occurred. Looking at the debug logs, I see the modules loading loader.c PASS. There all seem to load fine, just much slower than it was previously.

Any suggestions on where to look for a cause of things running slow after this?

Dan

6 thoughts on - Anyone Ever Experienced A Crash Where Asterisk Debug Output A Line With All Nulls

  • Did I get it correctly: the last line in the log before asterisk starts again after the reboot is the [nul]-line? If so, are you probably using ext4 or maybe reiserfs? I know of this problem if the machine crashes, open files can end up like described. AFAIK it’s a file system bug!

    Maybe because the machine is performing a file system check on some other partitions in parallel and it’s slowed down therefore?

    Regards Michael

  • Agree with Michael, this sounds like an OS crash to me. Given that you’re not seeing anything in the logs, it’s likely that by the time the crash occurs, the kernel is unable to write to disk, so the only real way to get info is to be looking at the console when it crashes. See also:
    https://help.ubuntu.com/community/DebuggingSystemCrash The initial slowness is likely due either to caching on later restarts, or to fsck.

  • Yes, the last line in in the log before asterisk starts again after the reboot is the [nul]-line.

    I believe you are right about the system using ext4 and the [nul]-line problem

    Wouldn’t /var/log/syslog show something like this if it’s happening in parallel?
    syslog has items before asterisk is starting, but once the Asterisk log files show it’s starting to completed, /var/log/syslog has nothing.
    Syslog has nothing for about 10 minutes after that.

    The strange thing is the customer did a manual restart of Ubuntu 20 minutes later and the same slow startup time happened.

  • VGhhbmsgeW91Lg0KDQpBcHByZWNpYXRlIHRoZSBoZWxwIG9uIHRoaXMuDQoNCkRhbg0KDQpGcm9t OiBhc3Rlcmlzay11c2VycyA8YXN0ZXJpc2stdXNlcnMtYm91bmNlc0BsaXN0cy5kaWdpdW0uY29t PiBPbiBCZWhhbGYgT2YgSm9obiBSdW55b24NClNlbnQ6IFdlZG5lc2RheSwgQXVndXN0IDE0LCAy MDE5IDEwOjUxIEFNDQpUbzogQXN0ZXJpc2sgVXNlcnMgTWFpbGluZyBMaXN0IC0gTm9uLUNvbW1l cmNpYWwgRGlzY3Vzc2lvbiA8YXN0ZXJpc2stdXNlcnNAbGlzdHMuZGlnaXVtL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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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6DQogICBodHRwOi8vbGlzdHMuZGlnaXVtLmNv bS9tYWlsbWFuL2xpc3RpbmZvL2FzdGVyaXNrLXVzZXJzDQoNCg0KLS0NClJlZ2FyZHMsDQpKb2hu IFJ1bnlvbg0KU2ltcGx5IE5VQw0KNTEyLTc2Ni0wNDAxIHgxMTEwDQo0OTUgUm91bmQgUm9jayBX
    ZXN0IERyLCBSb3VuZCBSb2NrLCBUWCA3ODY4MQ0K

  • Well, it was just speculation. Is it even now reproducible after the 3. or even later reboot? I would try to log in via ssh as fast as possible
    (or directly via a shell) and try to find the responsible process. Try to examine the IO.

    If the machine is shut down manually, did it perform a correct shutdown (= all file systems have been correctly unmounted and all processes have been stopped before unmounting)?

    Is the startup slow even if it’s done w/o reboot before?

    Regards Michael

  • I have been told they went to an earlier snapshot of the VM and are running on that one now so we no longer have access to the VM from the state it was in.

    The startup on their old snapshot VM is taking about 2 seconds for asterisk to load the configuration files.

    Someone finally admitted to me the VM that crashed was missing over 200 package updates. At this point, that’s what we are chalking it up to.

    Have a great day!

    Dan

    —–Original Message—