Entware / Entware-ng

Entware-ng
GNU General Public License v2.0
1.21k stars 153 forks source link

Prosody 0.9.12 segmentation fault [mipsel] #823

Closed ghost closed 6 years ago

ghost commented 6 years ago

Package: prosody [0.9.12]

For existing package:

Platform:

ASUS RT-N16 (MIPSR2 K26) with Tomato by Shibby 1.28.

cat /proc/cpuinfo:

system type     : Broadcom BCM4716 chip rev 1 pkg 10
processor       : 0
cpu model       : MIPS 74K V4.0
BogoMIPS        : 239.20
cpu MHz         : 480
wait instruction    : no
microsecond timers  : yes
tlb_entries     : 64
extra interrupt vector  : no
hardware watchpoint : yes
ASEs implemented    : mips16 dsp
shadow register sets    : 1
VCED exceptions     : not available
VCEI exceptions     : not available

Linux kernel version 2.6.22.19.


Prosody is a Lua application, but Lua itself seems to be running fine, so I can't quite tell where exactly is the issue without debugger facilities. I had to build Prosody from sources myself (ugh...), and this one that I built runs just fine right now (same 0.9.12 version). I used this toolchain (it comes with Linux binaries), if that helps.

zyxmon commented 6 years ago

/opt/bin/prosody & /opt/bin/prosodyctl have incorrect shebang. This will be fixed. No segmentation fault when running prosody on a mipsel router with 3.4 kernel. Probably your kernel version is too old.

ghost commented 6 years ago

on a mipsel router with 3.4 kernel

What firmware are you running? I still see Tomato project sticking with ancient 2.6 kernel. He backports some features though.

Probably your kernel version is too old.

It definitely is. I believe it's rather a subtle libc issue though. After all, the exactly same version built with Tomato toolchain does work without issues, and I built it with even more stuff (libevent, sqlite db support) than opkg provided version.

What is weird is that you'd expect everything else installed by opkg to randomly segfault, but no other installed package shows any sign of crashes: I tested NGINX, PHP 7, node.js, transmission, git, etc.

zyxmon commented 6 years ago

What firmware are you running?

This is not a Broadcom based router.

zyxmon commented 6 years ago

shebang is fixed via https://github.com/Entware-for-kernel-3x/entware-packages-3x/commit/5d65e6da8a15cc1eb57eb4d600d5b6f1f38bc13e It will be in entware-ng soon

gonsalez-ru commented 6 years ago

It seems that issue still actual. I'm catching "Segmentation fault" at Asus RT-N65u with 3x kernel and prosody_0.9.12-1a_mipselsf "

gonsalez-ru commented 6 years ago

cat /proc/cpuinfo system type : Ralink RT3883/RT3662 SoC processor : 0 cpu model : MIPS 74Kc V4.12 BogoMIPS : 249.34 wait instruction : yes microsecond timers : yes tlb_entries : 32 extra interrupt vector : yes hardware watchpoint : yes, count: 4, address/irw mask: [0x0000, 0x0ff8, 0x0ff8, 0x0ff8] ASEs implemented : mips16 dsp shadow register sets : 1 kscratch registers : 0 core : 0 VCED exceptions : not available VCEI exceptions : not available

uname -a Linux gate 3.0.102 #2 Mon Feb 1 01:08:32 KRAT 2016 mips GNU/Linux

custom firmware https://bitbucket.org/padavan/rt-n56u

zyxmon commented 6 years ago

I strongly recommend to install Entware-3x on Padavan firmware https://github.com/ProBackup-nl/Entware-ng-3x/wiki/Install-on-Padavan

You will need to create user/group to run prosody

 # prosodyctl start
Warning: Couldn't switch to Prosody user/group 'prosody'/'prosody': no-such-group

No segmentation fault here!