[foreign-jextract] Segmentation fault from generated code

Filip Krakowski krakowski at hhu.de
Fri Dec 18 11:12:27 UTC 2020


Hi,

I ran the code on Linux (CentOS Linux release 8.1.1911) after installing 
the "ucx" package (version 1.9). I will create a Docker container with 
the environment to reproduce this issue for easier debugging.

Best regards
Filip

On 12/17/20 10:49 PM, Maurizio Cimadamore wrote:
> Hi,
> I haven't seen this particular one.
>
> What platform are you on? What do you need to reproduce?
>
> Thanks
> Maurizio
>
> On 17/12/2020 18:43, Filip Krakowski wrote:
>> Hi,
>>
>> I work on a simple wrapper for ucx (https://github.com/openucx/ucx) 
>> and am experiencing a segmentation fault when calling any generated 
>> method. The strange thing is that the segmentation fault disappears 
>> as soon as I attach a (remote) debugger and manually step through the 
>> code.
>>
>>   * Screenshot - https://i.imgur.com/okl3epv.png
>>
>> My code does only access a struct's layout. I don't create any 
>> additional threads.
>>
>>    log.info("Starting");
>>    var layout = ucp_params_t.$LAYOUT();
>>    log.info("{}", layout);
>>
>> The generated layout looks like this.
>>
>>    static final MemoryLayout ucp_params$struct$LAYOUT_ =
>>    MemoryLayout.ofStruct(
>>             C_LONG.withName("field_mask"),
>>             C_LONG.withName("features"),
>>             C_LONG.withName("request_size"),
>>             C_POINTER.withName("request_init"),
>>             C_POINTER.withName("request_cleanup"),
>>             C_LONG.withName("tag_sender_mask"),
>>             C_INT.withName("mt_workers_shared"),
>>             MemoryLayout.ofPaddingBits(32),
>>             C_LONG.withName("estimated_num_eps"),
>>             C_LONG.withName("estimated_num_ppn")
>>    ).withName("ucp_params");
>>
>>
>> Is this a known Issue? I use the latest build from last night.
>>
>> Best regards
>> Filip



More information about the panama-dev mailing list