[erlang-bugs] More HiPE issues with binaries

Kostis Sagonas <>
Sat Mar 2 21:59:32 CET 2013

On 03/02/2013 09:17 PM, Loïc Hoguin wrote:
> Hello,
> Cowboy doesn't work when compiled with HiPE. When using curl on a simple
> hello world example, it sometimes work as expected, sometimes return a
> 408 timeout error. When using http_load
> (http://acme.com/software/http_load/) on the same example, it sometimes
> work and sometimes throws a weird function_clause error.
> =ERROR REPORT==== 2-Mar-2013::21:13:54 ===
> Error in process <0.26124.0> with exit value:
> {function_clause,[{cowboy_protocol,parse_hd_name,9,[]},{lists,zip,2,[]}]}
> As you can guess, lists:zip/2 doesn't call
> cowboy_protocol:parse_hd_name/9. Someone else reported a similar issue
> with the stacktrace in another project on IRC.
> Same result with R15B03 and R16B.
> Here are the steps to reproduce. Sorry it's not the smallest download, I
> can't isolate:
> ...
> Tell me how I can help get this fixed.

Hi Loïc,

One thing to know is that the stack traces that are produced when 
running native code are not as precise as those when running BEAM byte 
code. In particular, the stack (naturally) does not contain frames for 
tail calls and the stack walking component may occasionally be confused 
by mode-switches (e.g. byte code calling native code and vice versa). 
The latter is what most probably is happening here: you are most 
probably running with the 'lists' module not natively compiled.

Anyway, I'll put it on my TODO list to look at it but this period I am 
swamped. It would help to see if the bug persists if you configure with 
--enable-native-libs (if it does not then it's most probably something 
in the mode switch part) or if you can minimize it further to something 
with fewer cowboy files compiled to native code or at least something 
that always exhibits the error.


More information about the erlang-bugs mailing list