Hi Olev,

I just responded your issue.

I hope to have shed some light there.

BR,

Alan

On 7/3/20, Oleg Evseev <ev.m...@gmail.com> wrote:
> Regarding to can driver, from some moment I started getting
> DEBUGASSERT(sem->semcount<SEM_VALUE_MAX)
> in sem_post.c. Found the bug
> https://github.com/apache/incubator-nuttx/issues/1354
>
> I don't know, was DEBUGASSERT(pholder != NULL) a different appearance of
> the same bug or it is something else.
>
> --
> With regards,
> Oleg.
>
>
> вт, 30 июн. 2020 г. в 20:16, Oleg Evseev <ev.m...@gmail.com>:
>
>> Find out that this happens while in poll.
>>
>> вт, 30 июн. 2020 г. в 15:45, Oleg Evseev <ev.m...@gmail.com>:
>>
>>> Hi all,
>>>
>>> I wonder how can I debug
>>> DEBUGASSERT(pholder != NULL) in function nxsem_allocholder in file
>>> semaphore/sem_holder.c that happens after some time reading a lot of
>>> messages from can bus in can_reciever task?
>>>
>>> Task  looks like this (CAN dev is opened as shared file with
>>> file_open(&CANmodule->file, "/dev/can0", O_RDWR)):
>>>
>>> pollfd fds[1];
>>> fds[0].fd = -1;
>>> fds[0].ptr = CANmodule->file ;
>>> fds[0].events = POLLIN | POLLFILE;
>>>
>>> while (!_thread_should_exit) {
>>>     int ret = poll(fds, sizeof(fds) / sizeof(fds[0]), 1000);
>>>
>>>     if (fds[0].revents & POLLIN) {
>>>         /* Read the RX message */
>>>         CANreceive();
>>>     }
>>> }
>>>
>>> void CANreceive(CANmodule_t *CANmodule){
>>> struct can_msg_s msg = {};
>>> ssize_t nbytes;
>>>
>>>     nbytes = file_read(&CANmodule->file, &msg,  sizeof(struct can_msg_s)
>>> );
>>>     ...
>>> }
>>>
>>> Thanks in advance for any help.
>>>
>>> --
>>> With regards,
>>> Oleg.
>>>
>>
>

Reply via email to