This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: using asserts enabled with linux synthetic target


>>>>> "Tracy" == Tracy Jones <tracy@stratalight.com> writes:

    Tracy> Hi - Has anyone successfully run the linux synthetic target
    Tracy> with asserts enabled?

Yes.

    Tracy> I am trying to do so, but am running into problems.

    Tracy> When the network alarm thread runs and preempts the idle
    Tracy> thread, I an error saying that the idle thread it trying to
    Tracy> sleep. That seems like an ok thing in this case. Here's the
    Tracy> stack trace.

This does not sound right. According to the backtrace, the current
thread is attempting some sort of socket operation that requires a
mutex within the TCP/IP stack, and that mutex is already locked by
another thread with priority 7 - probably the background net
processing thread. If you get the assertion

    CYG_ASSERT( pri != CYG_THREAD_MIN_PRIORITY, "Idle thread trying to sleep!");

then the current thread is indeed the idle thread. But the idle thread
is not going to make any socket calls.

More likely, the idle thread was interrupted and we are currently in a
DSR as part of the interrupt handling process. DSR's are only allowed
to call certain functions, ones which are guaranteed not to block. All
socket operations are banned because they will need a mutex lock, and
that mutex may already be owned by another thread.

Are you by any chance attempting a socket call from inside a system
alarm handler created with cyg_alarm_create(), or something along
those lines?

Bart

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]