google-deepmind / google-deepmind/torch-hdf5

How to solve this segmentation fault?

Open
#86 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Lua
Stars
241
Forks
125
PR merge metrics
No merged PRs in 30d

Description

Hi,
How to solve this segmentation fault? Thanks

```
-- local hdf5 = require('hdf5')

local threads = require 'threads'

threadPool = threads.Threads(3, function(threadid) require('hdf5') end )
-- threadPool = threads.Threads(3)

for i = 1, 10 do
threadPool:addjob(function() local a = hdf5.open(i .. '.hdf5','w'); a:close() end )
end

threadPool:synchronize()
threadPool:terminate()
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the segmentation fault with the Lua snippet, comparing the two Thread construction variants and the require('hdf5') calls inside and outside the thread initializer. Trace the thread and HDF5 interaction to identify the failure, then document a verified workaround or fix and confirm that the loop completes without crashing.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.