Repository navigation
Bug: SIGABRT when two independent polling proxies use the same LoLa event #797
Description
Updated Scope
I am narrowing this issue to the SIGABRT observed with two independent
polling processes. I am removing the claim that Subscribe() creates an
executor thread; that statement was incorrect.
The reduced setup contains:
- one LoLa skeleton process;
- two separate client processes;
- one independent
Proxy/ProxyEventobject per client process; - both clients subscribe to and poll the same event;
- both clients call
GetNewSamples()from their own polling threads; - no
SetReceiveHandler(); - both clients use the same service instance;
- both client processes use the normal Linux scheduler (
SCHED_OTHER);
real-time scheduling is not part of the reproducer.
No high-level LoLa object is accessed concurrently by multiple application
threads. Each process accesses its own proxy object.
The observed failure is:
TransactionLog::ReferenceTransactionBegin()
precondition: !slot.GetTransactionBegin()
The failure occurs after approximately 300-500 cycles with real-time
scheduling.
Current Understanding
I do not want to claim a specific root cause before clarifying the supported
access pattern.
The question is whether two independent proxy instances in different
processes are allowed to call GetNewSamples() concurrently for the same event
and service instance. If this is supported, the assertion may indicate a
defect in the shared-memory transaction handling. If it is forbidden, please
point me to the AoU that defines this cross-process restriction.
Questions
Could you clarify:
- Are independent proxy instances in different processes allowed to call
GetNewSamples()concurrently for the same event? - If this is forbidden by an AoU, which AoU covers this cross-process case?
- If it is supported, could this assertion indicate a defect in the
transaction handling across independent proxy instances? - Is transaction-log state isolated per proxy instance when those proxies
communicate through the same shared-memory service instance?
Reproduction
- LoLa/communication version used by this repository:
v0.2.1 - One skeleton process
- Two independent client processes
- Same service instance and same event
- Both clients call
Subscribe() - Both clients poll using
GetNewSamples() - No
SetReceiveHandler() - Both client threads use
SCHED_FIFO - RT priority:
80 - Failure:
TransactionLog::ReferenceTransactionBegin()assertion - Time to failure: approximately 300-500 cycles
An assertion backtrace and minimal reproducer will be attached.
Workaround
Until the supported access pattern is clarified, we avoid multiple independent
polling clients on the same service instance. We either:
- use one LoLa consumer and fan out the data through application-owned shared
state; or - expose separate service instances for separate consumers.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
tfa2si commentedon Jul 30, 2026
We hit a different symptom of this same bug: a silent freeze in the notification dispatch when a second subscriber joins a service instance where one subscriber uses pure polling.
Trigger Conditions
GetNewSampleswith noSetReceiveHandler) on event 1Subscribe()on event 2 of the same service instanceOur Exact Setup
HfcZoneFeedbackservice instance has 2 events:zone_angle_batch(pure polling by HFC) andzone_stats(event-driven by telemetry)zone_angle_batchviaGetNewSamples— no notification thread involvedzone_stats.Subscribe(64U)— this writes aTransactionLogNodevia CAS into SHMHfcZoneCommandon another service instance) withSetReceiveHandlerzone_cmdhandler stops firing. However, zone_adapter's own stats thread (which bypasses LoLa notifications and callszone_stats.Send()directly) continues running fine.Why Pure Polling Matters
With pure polling, the skeleton's notification thread for the polled event (
zone_angle_batch) still exists in the LoLa executor thread pool even thoughSetReceiveHandlerwas never called. This executor thread shares the sameTransactionLogSetSHM region. When Subscribe writes toproxy_transaction_logs_via CAS for a different event in the sameServiceDataControl, the concurrent iteration by the executor thread reads corrupted state from non-atomicTransactionLogSlotbitfields.Key Insight
The race requires the skeleton process to have an active LoLa executor thread (created by any
Subscribe+SetReceiveHandlerin that process, not necessarily on the same event) that iterates SHM while a concurrentRegisterProxyElementfrom another process writes to SHM.Workaround Applied
Moved
zone_statsto its own dedicated service instance (HfcZoneStats,serviceId 6666) with separate SHM segment. No sharedTransactionLogSetacross events = no race.Test Results
With the workaround:
zone_angle_batch.Send()— 1623 calls over 15 secondszone_stats.Send()— 9 calls over 15 secondscrimson11 commentedon Aug 6, 2026
@tfa2si
Trying to understand your issue.
I focus now on the imho essential part of your report:
This can't happen, when you follow our AoUs. I.e. our AoU forbids, that you do concurrent access to
score::mw::comprovided high-level object instances like Proxy, ProxyEvent, ProxyField, Skeleton, SkeletonEvent, SkeletonField, ...See e.g. our AoU
ScoreReq.AoU NoneReentrantMethodsPerEventInstance!Just for you to know: We have separate Transaction-Logs for reference-transactions per
ProxyEventinstance! Thus, I fail to see, how you would get a race-condition on aTransactionLogSlot, when you follow our AoU.Can you just explain this specific issue, how a data-race can happen, when our AoUs are followed.
For the rest of your bug-report:
assumption when Subscribe() spawns executor threads.- we do NOT spawn a thread inSubscribe(). Why do you think we do? I followed your "link" "/message_passing_service_instance.cpp:925-931". There is no executor/thread spawned?tfa2si commentedon Aug 10, 2026
hi crimson11!
You are right about two points:
Subscribe()itself does not spawn a thread. My statement that it creates an executor thread was incorrect and I will remove it.The SIGABRT reproduction does not involve concurrent calls on the same C++
ProxyEventobject.There are two separate processes, each with its own proxy object and its own polling thread:
Both proxy objects refer to the same LoLa service instance and therefore access shared-memory communication state. No
Proxy,ProxyEvent, or other high-level communication object is shared between threads or processes.[-]Bug: TransactionLog BEGIN/END bitfields race between same-priority threads causes SIGABRT[/-][+]Bug: SIGABRT when two independent polling proxies use the same LoLa event[/+]tfa2si commentedon Aug 10, 2026
Thank you for pointing me to
ScoreReq.AoU NoneReentrantMethodsPerEventInstance.I agree that two application threads must not concurrently access the same
high-level
ProxyEventinstance.The reduced reproducer does not do that. It contains two separate client
processes, and each process creates and uses its own independent
Proxy/ProxyEventinstance. There is no shared high-level communicationobject between the clients and no concurrent access to one
ProxyEventinstance by two application threads.
I have created a minimal three-process reproducer:
Proxy/ProxyEventinstance;
zone_angle_batchevent;GetNewSamples()from independent polling loops;SetReceiveHandler()is used;SCHED_OTHER).The reproducer does not request or require
SCHED_FIFOor any real-timescheduling permissions. The latest trace therefore does not involve two
threads at the same RT priority.
With
score_communicationv0.2.1, the latest run reproduced a client abort under plainSCHED_OTHER. The captured backtrace resolves through:In the latest run:
SCHED_OTHERto 18,000 cycles.This shows that real-time scheduling is not a prerequisite for the transaction-log failure.
Could you clarify the cross-process case:
ScoreReq.AoU NoneReentrantMethodsPerEventInstancealso forbidconcurrent
GetNewSamples()calls when they are made by independentProxyEventinstances in different processes?transaction handling?
ProxyEventinstance also isolatethe transaction state when the instances use the same shared-memory service
instance?
As a temporary workaround, we avoid multiple independent polling clients on the same service instance. We either use one LoLa consumer and fan out through application-owned shared state, or expose separate service instances for separate consumers.
The attached archive
lola-797-reproducer.tar.gzcontains:I have attached the archive together with the three trace files:
lola_trace4_client_a.log
lola_trace4_client_b.log
lola_trace4_skeleton.log
lola-797-reproducer.tar.gz
tfa2si commentedon Aug 10, 2026
lola-issue797-evidence.tar.gz
I performed an additional phase-isolation test to determine whether the failure is caused by
Subscribe()or byGetNewSamples().With
score_communicationv0.3.0, process A continuously polledtopic_awhile process B used the same event:Subscribe()and then waiting did not affect A; A continued receivingGetNewSamples()exactly once, and then waiting also did not affect A; the call returned successfully with 32 samples.GetNewSamples()ontopic_a, A reproducibly aborted withSIGABRTwhile B continued polling.The same-event test used
maxSubscribers: 2, and bothSubscribe()calls returned successfully. Therefore, the observed failure is not explained by a subscriber-count configuration limit.The current evidence does not implicate
Subscribe()alone or oneGetNewSamples()call. It implicates repeated concurrent polling of the same event from separate processes.Different-event comparison
I also tested two clients polling different events,
topic_aandtopic_b,from the same service instance.
With
score_communicationv0.2.1, this configuration reproduced the bug:process A polling
topic_aaborted through the transaction-log path, whileprocess B polling
topic_bcontinued polling but stopped receiving newsamples.
With
score_communicationv0.3.0, the same different-event test completedwithout the transaction-log
SIGABRT. We ran three clean trials and one60-second trial with both receive counters continuing to advance. This
indicates that the v0.2.1 cross-event crash is fixed in v0.3.0 in this
reproducer.
The complete reproducer and logs are attached for the same-topic subscribe-only, one-poll, continuous-poll, and
v0.2.1comparison runs.Could you please clarify whether concurrent polling from separate
ProxyEventinstances in different processes on the same event is supported? If it is supported, could thev0.3.0same-eventSIGABRTbe investigated as a shared-memory transaction or event-state defect? If it is not supported, which AoU explicitly forbids this cross-process access pattern?crimson11 commentedon Sep 1, 2026
@tfa2si
Seems, that both of your consumer/proxy processes are using the very same
mw_com_config.json?And there you even did NOT configure a
globalsection with anapplicationIDproperty being different for these two proxy/consumer apps?Then this error is totally expected. I guess you also would have then ignored the WARN messages in the log for not having configured a
applicationID?Please read the tutorial: https://eclipse-score.github.io/communication/latest/score/mw/com/doc/tutorial/README.html ... explicitly this section: https://eclipse-score.github.io/communication/latest/score/mw/com/doc/tutorial/chapter_2/README.html#separate-configuration-files-for-provider-and-consumer
tfa2si commentedon Sep 1, 2026
You are right with that, i did not use applicationID in mw_com_config.json, also asked here a dedicated possibility for applicationID configuration to have a common mw_com_config.json for all apllication