leonarski_fandClaude Opus 5.5 ec387c3df6 rugnux: page-locked raw image bytes are freed only after the engine unregisters them
The first-pass spot engines (FirstPassRun::SpotEngine, SpotFindingWorkers::Engine)
were given back by move-assigning a fresh struct over them. A move-assignment goes
in declaration order, so it freed raw_image - whose bytes the analysis engine had
page-locked with cudaHostRegister (PinInputRegion, every uncompressed/CBF frame) -
and only then destroyed the engine, which unregistered the already freed range.
In between, the address may be handed to another thread's buffer. Measured in a
standalone test on this card and driver: a copy into a new buffer at a stale
registered address goes to the old pages (the data never arrives, no error), and
cudaHostRegister / cudaMallocHost on it fail with "already mapped"; eight threads
freeing in this order made unrelated threads' ordinary pageable copies return
wrong data, the correct order none. The engines now release themselves engine
first, buffer last.

The image pass had the same hazard where the writer still holds an image: the
worker read the next frame into a new one and dropped the old one, which the
writer then freed while the worker's engine still had it registered. The old
image is now held until the engine has pinned the new one.

This is the most likely cause of a sticky copy-engine fault (Xid 31, CE write to
an unmapped address) that ended a rotation run's scaling with "unspecified
launch failure": the speculative geometry probe released its spot engines on
many threads at once while the merges beside it were copying. That failure was
not reproduced in 9 reruns before the fix, so the link is inferred, not shown.

Merged data unchanged (p.hkl md5 and MTZ data identical to rc175 on 10 sets;
p.hkl identical with --write-process-h5 on a CBF set).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EizBKhTqrAYago9KJG3dA3
2026-10-10 13:15:26 +02:00
2026-08-13 17:03:10 +02:00
2026-09-29 15:57:32 +02:00
2026-10-06 14:03:18 +02:00
2026-09-02 21:17:31 +02:00
2026-10-07 14:14:39 +02:00
2026-09-29 15:57:32 +02:00
2026-10-07 14:14:39 +02:00
2026-09-02 21:17:31 +02:00
2026-09-15 17:09:31 +02:00
2026-03-26 20:50:33 +01:00
2026-06-23 20:29:49 +02:00
2026-06-23 20:29:49 +02:00
2026-09-22 06:48:37 +02:00
2024-11-22 21:25:20 +01:00
2024-12-02 21:17:14 +01:00
2026-08-13 17:03:10 +02:00
2025-10-25 22:05:47 +02:00
2026-07-03 19:18:56 +02:00
2026-08-13 17:03:10 +02:00
2026-10-06 14:03:18 +02:00
2026-08-25 08:21:39 +02:00
2026-09-22 06:48:37 +02:00
2026-08-26 22:47:00 +02:00
2026-10-07 14:14:39 +02:00

Jungfraujoch

Application to receive and analyse data from the PSI JUNGFRAU and EIGER detectors, together with rugnux, its program for processing stored diffraction data - rotation and serial, macromolecular and small-molecule - from images to merged reflections.

All documentation is now placed in docs/ subdirectory and for the current version hosted on Jungfraujoch Read The Docs page.

S
Description
Jungfraujoch Data Acquisition System, Rugnux Data Processing Application, and Diffraction Viewer
Readme GPL-3.0
3 GiB
Languages
C++ 77.8%
HTML 5.5%
C 4.3%
Cuda 4%
TypeScript 3.2%
Other 5.1%