[erlang-questions] Issues attaching to an Erlang process after hot code load

Éric Pailleau <>
Mon Jul 6 19:15:58 CEST 2015


Hi,
There is no security issues in Erlang. As far there is no security at all...
Once you know this, everything become simpler.
Note a release upgrade may need a VM reboot in some case,  when changing Erlang core libraries or Erlang release.  So "hot code load" does not necessary imply no VM stop.

On your problem, I agree, pipes locations is a problem. 
Regards 

Le 6 juil. 2015 01:11, Technion <> a écrit :
>
> Hi,
>
>
> I have found recently found out that Erlang questions in Stackoverflow earn a person a tumbleweed award
>
>
> Throughout development, I have in general had no issues starting a release, and running "attach". I have however found after performing a hot code load, this functionality appears to break.
>
> I fully documented (https://github.com/technion/erlvulnscan) in the "Hot code upgrade" heading the process I used. This process appears to have worked correctly, however, I then lose the ability to attach, and more importantly, send "stop" commands when I later wish to perform maintenance on this process.
>
>
> Using the old release directory:
>
> $ ./erlvulnscan-1.02/bin/erlvulnscan attach
> escript: Failed to open
> file: /home/technion/erlvulnscan/rel/erlvulnscan-1.02/erts-6.4/bin/nodetool
> Node is not running!
>
> In the new one:
>
> $ ./erlvulnscan-1.03/bin/erlvulnscan attach
> pong
> Can't access pipe  
> directory /tmp//home/technion/erlvulnscan/rel/erlvulnscan-1.03/: 
> No such file or directory
>
> I did ultimately find I could connect using this command:
>
> $ ./erlvulnscan-1.03/erts-6.4/bin/to_erl 
> /tmp/home/technion/erlvulnscan/rel/erlvulnscan-1.02/erlang.pipe.2
>
> However this feels like an absurd workaround - like something is obviously broken to get into this state.
>
> I can kill the process (using the kill command) after which it can be started and stopped without issue, suggesting something was done wrong, or got broken, during the code load process.
>
>
> I'm not sure if it's an Erlangism I should get used to, but the location of these pipes in general feels very unusual. I don't see why an entire directory structure would be recreated under /tmp, I'd expect to either sit under the release' own directory, or one directory deep in /tmp. The fact it's a deterministic file and directory name could lead to security issues.
>
>
>  
>
> Any assistance appreciated (any comments on code or general design also appreciated, this is my first Erlang project).


More information about the erlang-questions mailing list