[SOLVED] Blynk Server crash on Raspberry PI 3

Hi all,

I find this project very interesting !
I’ve successful created a local Blynk server on Windows 10 so I try to do the same on my Raspberry PI 3.
Unfortunately, that don’t work.
I’ve followed the described procedure, the server runs but when I try to connect (as new user or to the admin page), the server crash immediately.
State of place :

  • Raspberry PI 3 with Raspbian
  • Oracle Java SDK : 8.0_73_B02
  • Blynk server : server-0.14.0.jar (from github)
  • OpenSSH_6.7p1 Raspbian-5+deb8u1, OpenSSL 1.0.1k 8 Jan 2015

I’ve tried with or without self generated ssl certificates : same problem
I’ve tried on a freshly Ubuntu (Mate) installation : same problem

Message from the console :
<—

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x768f0494, pid=3438, tid=1712714848

JRE version: Java™ SE Runtime Environment (8.0_73-b02) (build 1.8.0_73-b02)

Java VM: Java HotSpot™ Client VM (25.73-b02 mixed mode linux-arm )

Problematic frame:

V [libjvm.so+0x4e1494] Unsafe_GetNativeByte+0x70

Failed to write core dump. Core dumps have been disabled. To enable core dumping, try “ulimit -c unlimited” before starting Java again

An error report file with more information is saved as:

/home/pi/java/jre/bin/hs_err_pid3438.log

If you would like to submit a bug report, please visit:

http://bugreport.java.com/bugreport/crash.jsp

Aborted
—>

extract of process log :
<—
Stack: [0x66110000,0x66160000], sp=0x6615e338, free space=312k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x4e1494] Unsafe_GetNativeByte+0x70

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j sun.misc.Unsafe.getByte(J)B+0
j io.netty.util.internal.PlatformDependent0.getByte(J)B+4
j io.netty.util.internal.PlatformDependent.getByte(J)B+1
j io.netty.buffer.UnsafeByteBufUtil.getShort([BI)S+29
j io.netty.buffer.UnpooledUnsafeHeapByteBuf._getShort(I)S+5
j io.netty.buffer.UnpooledUnsafeHeapByteBuf.getShort(I)S+8
j io.netty.buffer.AbstractByteBuf.getUnsignedShort(I)I+2
j io.netty.handler.ssl.SslHandler.getEncryptedPacketLength(Lio/netty/buffer/ByteBuf;I)I+66
j io.netty.handler.ssl.SslHandler.decode(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;Ljava/util/List;)V+89
j io.netty.handler.codec.ByteToMessageDecoder.callDecode(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;Ljava/util/List;)V+46
j io.netty.handler.codec.ByteToMessageDecoder.channelRead(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;)V+81
j io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Ljava/lang/Object;)V+9
j io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Ljava/lang/Object;)Lio/netty/channel/ChannelHandlerContext;+35
j io.netty.handler.codec.ByteToMessageDecoder.handlerRemoved(Lio/netty/channel/ChannelHandlerContext;)V+29
j io.netty.channel.DefaultChannelPipeline.callHandlerRemoved0(Lio/netty/channel/AbstractChannelHandlerContext;)V+5
j io.netty.channel.DefaultChannelPipeline.callHandlerRemoved(Lio/netty/channel/AbstractChannelHandlerContext;)V+45
j io.netty.channel.DefaultChannelPipeline.replace0(Lio/netty/channel/AbstractChannelHandlerContext;Ljava/lang/String;Lio/netty/channel/AbstractChannelHandlerContext;)V+94
j io.netty.channel.DefaultChannelPipeline.replace(Lio/netty/channel/AbstractChannelHandlerContext;Ljava/lang/String;Lio/netty/channel/ChannelHandler;)Lio/netty/channel/ChannelHandler;+102
j io.netty.channel.DefaultChannelPipeline.replace(Lio/netty/channel/ChannelHandler;Ljava/lang/String;Lio/netty/channel/ChannelHandler;)Lio/netty/channel/ChannelPipeline;+8
j io.netty.handler.ssl.SniHandler.decode(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;Ljava/util/List;)V+100
j io.netty.handler.codec.ByteToMessageDecoder.callDecode(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;Ljava/util/List;)V+46
j io.netty.handler.codec.ByteToMessageDecoder.channelRead(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;)V+81
j io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Ljava/lang/Object;)V+9
j io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Ljava/lang/Object;)Lio/netty/channel/ChannelHandlerContext;+35
j io.netty.channel.DefaultChannelPipeline.fireChannelRead(Ljava/lang/Object;)Lio/netty/channel/ChannelPipeline;+5
j io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read()V+175
j io.netty.channel.nio.NioEventLoop.processSelectedKey(Ljava/nio/channels/SelectionKey;Lio/netty/channel/nio/AbstractNioChannel;)V+42
j io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized([Ljava/nio/channels/SelectionKey;)V+37
j io.netty.channel.nio.NioEventLoop.processSelectedKeys()V+15
j io.netty.channel.nio.NioEventLoop.run()V+84
j io.netty.util.concurrent.SingleThreadEventExecutor$2.run()V+13
j io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run()V+4
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
—>

Seems there is a problem with SSL.

Hope you can help me.

Thanks in advance.

Hm. Interesting. I’ll have a look. Thank you for reporting.

  • Oracle Java SDK : 8.0_73_B02

Is that correct version? How did you install java?

I’ve tried with apt-get and manually (following this post : Blynk Server on Raspberry Pi running Openelec - Noob proof)
Anyway, It’s the JDK8

What OS is installed on rasp?

Sorry, forgot to mention that…
From lsb_release
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie

From uname
Linux 4.1.19-v7+ armv7l

@jean I have a feeling that problem in 1.8.0_73-b02 where b02 means BETA. Is that possible to install something else? Maybe just direct download from here http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html ? jdk-8u73-linux-arm64-vfp-hflt.tar.gz I suppose. During run you may need specify direct path to java.

Install the version from Oracle site.
(seems the 64 bits version don’t run on Raspbian 8.0)
Anyway, from java -version
java version “1.8.0_73”
Java™ SE Runtime Environment (build 1.8.0_73-b02)
Java HotSpot™ Client VM (build 25.73-b02, mixed mode)

to be sure, I check which “java” is running :
pi 3841 107 6.7 273224 51092 pts/0 Sl+ 02:29 0:09 /home/pi/java/bin/java -jar server-0.14.0.jar -dataFolder /home/pi/Blynk
It’s well the last download.
Trying access to admin page ==> crash

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x7685d494, pid=3841, tid=1712387168

# JRE version: Java™ SE Runtime Environment (8.0_73-b02) (build 1.8.0_73-b02)
# Java VM: Java HotSpot™ Client VM (25.73-b02 mixed mode linux-arm )

JRE and JVM are correct version (the one just downloaded and installed)

I’ll try something…
I’ll run the rasp with Wheezy (distro before Jessie) to see if I get the same problem.

Rasp PI 3 don’t boot on Wheezy

I received this error on Raspi 1 b+ running with Raspbian Jessie while I was trying to create an account.

> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  SIGSEGV (0xb) at pc=0xb682d198, pid=13864, tid=2856383584
> #
> # JRE version: Java(TM) SE Runtime Environment (8.0-b132) (build 1.8.0-b132)
> # Java VM: Java HotSpot(TM) Client VM (25.0-b70 mixed mode linux-arm )
> # Problematic frame:
> # V  [libjvm.so+0x4a4198]  Unsafe_GetNativeByte+0x70

Okey guys, so issue is in 3-d party network library and already has been fixed. But we need to wait for new release of that library to avoid problems with snapshot versions. So estimation for fix would be 2-4 weeks. I hope this is not critical for you?

1 Like

Thanks for your fast reaction.
Not very critical for me, I’m still in “preview mode”. I need to build sensors first.

@jean @Vijabei I just thought - there is no need for you to wait for new release. So I made a release with fix. Here you go https://github.com/blynkkk/blynk-server/releases/download/v0.14.0/server-0.14.0_rasp3_fix.jar

2 Likes

@Dmitriy Awesome! Works great.

1 Like

I can confirm it also exists on the Raspi 2 model. I was already pulling out hairs why it wouldn’t work with latest server version … :stuck_out_tongue:

Btw, fix also worked on my RasPI 1 A+ with Rasbian 8 and Java 8. Thank you

My Saturday night with my new Pi 2 was having this issue too!
Good to hear that is was not me…

The fix does however not repair the SSL part. I went back to a 0.12.x version so as to get working SSL certs, so I think there need to be some more bug squashing :wink:

Thank you Dmitry.
Server running !
Thanks for you fast reaction.

1 Like