EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: [Bug 1932120] [NEW] callbackRequest potentially accesses uninitialized memory
From: Dirk Zimoch via Core-talk <core-talk at aps.anl.gov>
To: core-talk at aps.anl.gov
Date: Wed, 16 Jun 2021 07:08:59 -0000
Public bug reported:

If epicsAtomicCmpAndSwapIntT() in callbackInit() fails for some reason
(e.g. because of bug #1932118), the callback queues never get
initialized (and callback threads never get started). Nevertheless,
callbackRequest() will use these uninitialized queues (and an
uninitialized event semaphore) without checking, resulting in strange
message from a spinLock in the uninitialized queue:

0x132f380 (timerQueue): epicsSpinLock(0x1fda0b79): Deadlock.
Recursive lock, missed unlock or block when locked.Thread timerQueue (0x132f380) can't proceed, suspending.

A patch is attached.

** Affects: epics-base
     Importance: Undecided
         Status: New

** Patch added: "patch"
   https://bugs.launchpad.net/bugs/1932120/+attachment/5504984/+files/callback.patch

-- 
You received this bug notification because you are a member of EPICS
Core Developers, which is subscribed to EPICS Base.
Matching subscriptions: epics-core-list-subscription
https://bugs.launchpad.net/bugs/1932120

Title:
  callbackRequest potentially accesses uninitialized memory

Status in EPICS Base:
  New

Bug description:
  If epicsAtomicCmpAndSwapIntT() in callbackInit() fails for some reason
  (e.g. because of bug #1932118), the callback queues never get
  initialized (and callback threads never get started). Nevertheless,
  callbackRequest() will use these uninitialized queues (and an
  uninitialized event semaphore) without checking, resulting in strange
  message from a spinLock in the uninitialized queue:

  0x132f380 (timerQueue): epicsSpinLock(0x1fda0b79): Deadlock.
  Recursive lock, missed unlock or block when locked.Thread timerQueue (0x132f380) can't proceed, suspending.

  A patch is attached.

To manage notifications about this bug go to:
https://bugs.launchpad.net/epics-base/+bug/1932120/+subscriptions

Replies:
[Bug 1932120] Re: callbackRequest potentially accesses uninitialized memory Dirk Zimoch via Core-talk
[Bug 1932120] Re: callbackRequest potentially accesses uninitialized memory Andrew Johnson via Core-talk
[Bug 1932120] Re: callbackRequest potentially accesses uninitialized memory Dirk Zimoch via Core-talk
[Bug 1932120] Re: callbackRequest potentially accesses uninitialized memory Dirk Zimoch via Core-talk
[Bug 1932120] Re: callbackRequest potentially accesses uninitialized memory Andrew Johnson via Core-talk
[Bug 1932120] Re: callbackRequest potentially accesses uninitialized memory Andrew Johnson via Core-talk

Navigate by Date:
Prev: [Bug 1932118] [NEW] Bug in vxWorks epicsAtomicCmpAndSwapIntT Dirk Zimoch via Core-talk
Next: [Bug 1932118] Re: Bug in vxWorks epicsAtomicCmpAndSwapIntT Dirk Zimoch via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
Navigate by Thread:
Prev: [Bug 1932118] Re: Bug in vxWorks epicsAtomicCmpAndSwapIntT Andrew Johnson via Core-talk
Next: [Bug 1932120] Re: callbackRequest potentially accesses uninitialized memory Dirk Zimoch via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
ANJ, 03 Jul 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·