cancel
Showing results for 
Search instead for 
Did you mean: 

MongoDB crashing on STM32MP157F-DK2 board

KMOHA.1
Associate

I followed the steps to install the mongodb from the openSTLinux distribution.

when I run the mongodb from the terminal, it is crashing with the bus error.

root@stm32mp1:/usr/bin# mongod

Bus error (core dumped)

Appreciate your help..

1 ACCEPTED SOLUTION

Accepted Solutions

@KMOHA.1​ 

I confirm my initial guess after installing the mongodb package from the ecosystem-3.1:

root@stm32mp1:~# apt-cache policy mongodb
mongodb:
  Installed: 4.2.2-r0
  Candidate: 4.2.2-r0
  Version table:
 *** 4.2.2-r0 500
        500 http://packages.openstlinux.st.com/3.1 dunfell/untested armhf Packages
        100 /var/lib/dpkg/status

Before launching mongod:

root@stm32mp1:~# cat /proc/cpu/alignment
User:           0
System:         0 (0x0)
Skipped:        0
Half:           0
Word:           0
DWord:          0
Multi:          0
User faults:    2 (fixup)

Then after launching mongod:

root@stm32mp1:~# cat /proc/cpu/alignment
User:           1
System:         0 (0x0)
Skipped:        1
Half:           0
Word:           0
DWord:          0
Multi:          0
User faults:    2 (fixup)

The output of dmesg shows:

[  211.231332] Alignment trap: not handling instruction f9660aef at [<016d8dca>]
[  211.237169] 8<--- cut here ---
[  211.240230] Unhandled fault: alignment exception (0x001) at 0xbeeb6aa8
[  211.248709] pgd = f2925d3c
[  211.249969] [beeb6aa8] *pgd=c58cc835, *pte=d9e1875f, *ppte=d9e18c7f

I think you should report a bug to the Mongod team.

Best regards,

--JM

View solution in original post

5 REPLIES 5
Olivier GALLIEN
ST Employee

Hi @KMOHA.1​ ,

By steps do you means installing with apt-get from package repository or else ?

Can you specify OpenSTLinux version you use ?

Thanks

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Jean-Marc B
ST Employee

Hi @KMOHA.1​ 

Here, the «bus error» probably means unaligned data access.

By compiling the mongodb package with the compiler option «-Wcast-align=strict», I see a lot of conversion problems (see the attachment file extracted from the bitbake log.do_compile log). ARM devices are less tolerant than other architectures hence the crash.

Do you see anything related to an unaligned access in the /var/log/mongodb or other log files?

Best regards,

--JM

@KMOHA.1​ 

I confirm my initial guess after installing the mongodb package from the ecosystem-3.1:

root@stm32mp1:~# apt-cache policy mongodb
mongodb:
  Installed: 4.2.2-r0
  Candidate: 4.2.2-r0
  Version table:
 *** 4.2.2-r0 500
        500 http://packages.openstlinux.st.com/3.1 dunfell/untested armhf Packages
        100 /var/lib/dpkg/status

Before launching mongod:

root@stm32mp1:~# cat /proc/cpu/alignment
User:           0
System:         0 (0x0)
Skipped:        0
Half:           0
Word:           0
DWord:          0
Multi:          0
User faults:    2 (fixup)

Then after launching mongod:

root@stm32mp1:~# cat /proc/cpu/alignment
User:           1
System:         0 (0x0)
Skipped:        1
Half:           0
Word:           0
DWord:          0
Multi:          0
User faults:    2 (fixup)

The output of dmesg shows:

[  211.231332] Alignment trap: not handling instruction f9660aef at [<016d8dca>]
[  211.237169] 8<--- cut here ---
[  211.240230] Unhandled fault: alignment exception (0x001) at 0xbeeb6aa8
[  211.248709] pgd = f2925d3c
[  211.249969] [beeb6aa8] *pgd=c58cc835, *pte=d9e1875f, *ppte=d9e18c7f

I think you should report a bug to the Mongod team.

Best regards,

--JM

thanks Jean. I will check how we can report this to mongodb team.

Jean-Marc B
ST Employee

For the record, same behavior with ecosystem-4.0.0:

mongodb:
  Installed: 4.4.13-r0
  Candidate: 4.4.13-r0
  Version table:
 *** 4.4.13-r0 500
        500 http://packages.openstlinux.st.com/4.0 kirkstone/untested armhf Packages
        100 /var/lib/dpkg/status