You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Werner Punz <we...@gmail.com> on 2022/10/03 12:07:49 UTC

Bug?

Hi I am running into a weird bug in my integration testing.
Following I have built a stack of MyFaces 4.0 with weld as beans provider
and I am getting an NPE sometimes (not reproducible after a refresh in)
AbstractContext.destroyAll(contextualStorage, facesStorage)

The problem seems to be that that contextualStorage comes in as null and
there is no null check. The weird thing is, that after a full page reload
the error is gone.
I suspect a bug on the myfaces or Weld side for this case.
I null check would fix this, but I am not sure whether there is a deeper
bug in there.

Can anyone who has more insight in this area comment?

Cheers

Werner

Re: Bug?

Posted by Werner Punz <we...@gmail.com>.
Bugreport filed against RC2, thanks everyone for answering.


Am Di., 4. Okt. 2022 um 11:55 Uhr schrieb Werner Punz <werner.punz@gmail.com
>:

> Good news is, all my other tests seem to run stable in an endless loop. So
> I must have triggered an absolute corner case here.
>
> Werner
>
>
> Am Di., 4. Okt. 2022 um 11:53 Uhr schrieb Werner Punz <
> werner.punz@gmail.com>:
>
>> So I have finally narrowed down the issue.
>>
>> I am issuing an implicit nav case via faces.ajax and an execute on the
>> command link triggering it, which seems to make the viewstate go haywire,
>> my assumption is that the viewscope references are not properly cleared up
>> and then after some repetitions we run out of the view history and
>> reference data which has dropped out already.
>>
>> I will file a bugreport once I have the testcase fully isolated. Btw. in
>> myfaces 2.3 the problem does not occur with the same ajax script base (jsf
>> 2.3 shim on top of the faces 4.0 scripts), so I can rule out my script
>> doing something nasty with the viewstates.
>>
>>
>>
>> Am Mo., 3. Okt. 2022 um 16:28 Uhr schrieb Werner Punz <
>> werner.punz@gmail.com>:
>>
>>> Seems like one of my tests is triggering this race condition (have been
>>> running 4 tests in an endless loop without geting it). I will try to narrow
>>> it down tomorrow and then will issue a bugreport.
>>> My guess is we have a corner condition where the viewstate might not get
>>> cleaned up entirely.
>>>
>>>
>>> Am Mo., 3. Okt. 2022 um 15:08 Uhr schrieb Werner Punz <
>>> werner.punz@gmail.com>:
>>>
>>>> I am trying but the error is very erratic unfortunately.
>>>>
>>>>
>>>> Am Mo., 3. Okt. 2022 um 15:05 Uhr schrieb Melloware <
>>>> mellowaredev@gmail.com>:
>>>>
>>>>> Werner, if you can isolate it please open a JIRA ticket with the stack
>>>>> trace and the info please!
>>>>>
>>>>>
>>>>> On 10/3/2022 8:59 AM, Werner Punz wrote:
>>>>>
>>>>> Got a little bit further, the null stems from a referenced viewstate
>>>>> id, which does not exist anymore in the viewstate map.
>>>>> The thing is, that when I trigger the page sequence manually I do not
>>>>> run into this. With automation i run into it on a random scale.
>>>>> This looks almost like some kind of race condition to me.
>>>>>
>>>>> I have a problem giving a testreport on it, given i cannot fully
>>>>> isolate the issue for now to a reproducible case.
>>>>>
>>>>>
>>>>> Am Mo., 3. Okt. 2022 um 14:07 Uhr schrieb Werner Punz <
>>>>> werner.punz@gmail.com>:
>>>>>
>>>>>> Hi I am running into a weird bug in my integration testing.
>>>>>> Following I have built a stack of MyFaces 4.0 with weld as beans
>>>>>> provider and I am getting an NPE sometimes (not reproducible after a
>>>>>> refresh in) AbstractContext.destroyAll(contextualStorage, facesStorage)
>>>>>>
>>>>>> The problem seems to be that that contextualStorage comes in as null
>>>>>> and there is no null check. The weird thing is, that after a full page
>>>>>> reload the error is gone.
>>>>>> I suspect a bug on the myfaces or Weld side for this case.
>>>>>> I null check would fix this, but I am not sure whether there is a
>>>>>> deeper bug in there.
>>>>>>
>>>>>> Can anyone who has more insight in this area comment?
>>>>>>
>>>>>> Cheers
>>>>>>
>>>>>> Werner
>>>>>>
>>>>>>

Re: Bug?

Posted by Werner Punz <we...@gmail.com>.
Good news is, all my other tests seem to run stable in an endless loop. So
I must have triggered an absolute corner case here.

Werner


Am Di., 4. Okt. 2022 um 11:53 Uhr schrieb Werner Punz <werner.punz@gmail.com
>:

> So I have finally narrowed down the issue.
>
> I am issuing an implicit nav case via faces.ajax and an execute on the
> command link triggering it, which seems to make the viewstate go haywire,
> my assumption is that the viewscope references are not properly cleared up
> and then after some repetitions we run out of the view history and
> reference data which has dropped out already.
>
> I will file a bugreport once I have the testcase fully isolated. Btw. in
> myfaces 2.3 the problem does not occur with the same ajax script base (jsf
> 2.3 shim on top of the faces 4.0 scripts), so I can rule out my script
> doing something nasty with the viewstates.
>
>
>
> Am Mo., 3. Okt. 2022 um 16:28 Uhr schrieb Werner Punz <
> werner.punz@gmail.com>:
>
>> Seems like one of my tests is triggering this race condition (have been
>> running 4 tests in an endless loop without geting it). I will try to narrow
>> it down tomorrow and then will issue a bugreport.
>> My guess is we have a corner condition where the viewstate might not get
>> cleaned up entirely.
>>
>>
>> Am Mo., 3. Okt. 2022 um 15:08 Uhr schrieb Werner Punz <
>> werner.punz@gmail.com>:
>>
>>> I am trying but the error is very erratic unfortunately.
>>>
>>>
>>> Am Mo., 3. Okt. 2022 um 15:05 Uhr schrieb Melloware <
>>> mellowaredev@gmail.com>:
>>>
>>>> Werner, if you can isolate it please open a JIRA ticket with the stack
>>>> trace and the info please!
>>>>
>>>>
>>>> On 10/3/2022 8:59 AM, Werner Punz wrote:
>>>>
>>>> Got a little bit further, the null stems from a referenced viewstate
>>>> id, which does not exist anymore in the viewstate map.
>>>> The thing is, that when I trigger the page sequence manually I do not
>>>> run into this. With automation i run into it on a random scale.
>>>> This looks almost like some kind of race condition to me.
>>>>
>>>> I have a problem giving a testreport on it, given i cannot fully
>>>> isolate the issue for now to a reproducible case.
>>>>
>>>>
>>>> Am Mo., 3. Okt. 2022 um 14:07 Uhr schrieb Werner Punz <
>>>> werner.punz@gmail.com>:
>>>>
>>>>> Hi I am running into a weird bug in my integration testing.
>>>>> Following I have built a stack of MyFaces 4.0 with weld as beans
>>>>> provider and I am getting an NPE sometimes (not reproducible after a
>>>>> refresh in) AbstractContext.destroyAll(contextualStorage, facesStorage)
>>>>>
>>>>> The problem seems to be that that contextualStorage comes in as null
>>>>> and there is no null check. The weird thing is, that after a full page
>>>>> reload the error is gone.
>>>>> I suspect a bug on the myfaces or Weld side for this case.
>>>>> I null check would fix this, but I am not sure whether there is a
>>>>> deeper bug in there.
>>>>>
>>>>> Can anyone who has more insight in this area comment?
>>>>>
>>>>> Cheers
>>>>>
>>>>> Werner
>>>>>
>>>>>

Re: Bug?

Posted by Werner Punz <we...@gmail.com>.
So I have finally narrowed down the issue.

I am issuing an implicit nav case via faces.ajax and an execute on the
command link triggering it, which seems to make the viewstate go haywire,
my assumption is that the viewscope references are not properly cleared up
and then after some repetitions we run out of the view history and
reference data which has dropped out already.

I will file a bugreport once I have the testcase fully isolated. Btw. in
myfaces 2.3 the problem does not occur with the same ajax script base (jsf
2.3 shim on top of the faces 4.0 scripts), so I can rule out my script
doing something nasty with the viewstates.



Am Mo., 3. Okt. 2022 um 16:28 Uhr schrieb Werner Punz <werner.punz@gmail.com
>:

> Seems like one of my tests is triggering this race condition (have been
> running 4 tests in an endless loop without geting it). I will try to narrow
> it down tomorrow and then will issue a bugreport.
> My guess is we have a corner condition where the viewstate might not get
> cleaned up entirely.
>
>
> Am Mo., 3. Okt. 2022 um 15:08 Uhr schrieb Werner Punz <
> werner.punz@gmail.com>:
>
>> I am trying but the error is very erratic unfortunately.
>>
>>
>> Am Mo., 3. Okt. 2022 um 15:05 Uhr schrieb Melloware <
>> mellowaredev@gmail.com>:
>>
>>> Werner, if you can isolate it please open a JIRA ticket with the stack
>>> trace and the info please!
>>>
>>>
>>> On 10/3/2022 8:59 AM, Werner Punz wrote:
>>>
>>> Got a little bit further, the null stems from a referenced viewstate id,
>>> which does not exist anymore in the viewstate map.
>>> The thing is, that when I trigger the page sequence manually I do not
>>> run into this. With automation i run into it on a random scale.
>>> This looks almost like some kind of race condition to me.
>>>
>>> I have a problem giving a testreport on it, given i cannot fully isolate
>>> the issue for now to a reproducible case.
>>>
>>>
>>> Am Mo., 3. Okt. 2022 um 14:07 Uhr schrieb Werner Punz <
>>> werner.punz@gmail.com>:
>>>
>>>> Hi I am running into a weird bug in my integration testing.
>>>> Following I have built a stack of MyFaces 4.0 with weld as beans
>>>> provider and I am getting an NPE sometimes (not reproducible after a
>>>> refresh in) AbstractContext.destroyAll(contextualStorage, facesStorage)
>>>>
>>>> The problem seems to be that that contextualStorage comes in as null
>>>> and there is no null check. The weird thing is, that after a full page
>>>> reload the error is gone.
>>>> I suspect a bug on the myfaces or Weld side for this case.
>>>> I null check would fix this, but I am not sure whether there is a
>>>> deeper bug in there.
>>>>
>>>> Can anyone who has more insight in this area comment?
>>>>
>>>> Cheers
>>>>
>>>> Werner
>>>>
>>>>

Re: Bug?

Posted by Werner Punz <we...@gmail.com>.
Seems like one of my tests is triggering this race condition (have been
running 4 tests in an endless loop without geting it). I will try to narrow
it down tomorrow and then will issue a bugreport.
My guess is we have a corner condition where the viewstate might not get
cleaned up entirely.


Am Mo., 3. Okt. 2022 um 15:08 Uhr schrieb Werner Punz <werner.punz@gmail.com
>:

> I am trying but the error is very erratic unfortunately.
>
>
> Am Mo., 3. Okt. 2022 um 15:05 Uhr schrieb Melloware <
> mellowaredev@gmail.com>:
>
>> Werner, if you can isolate it please open a JIRA ticket with the stack
>> trace and the info please!
>>
>>
>> On 10/3/2022 8:59 AM, Werner Punz wrote:
>>
>> Got a little bit further, the null stems from a referenced viewstate id,
>> which does not exist anymore in the viewstate map.
>> The thing is, that when I trigger the page sequence manually I do not run
>> into this. With automation i run into it on a random scale.
>> This looks almost like some kind of race condition to me.
>>
>> I have a problem giving a testreport on it, given i cannot fully isolate
>> the issue for now to a reproducible case.
>>
>>
>> Am Mo., 3. Okt. 2022 um 14:07 Uhr schrieb Werner Punz <
>> werner.punz@gmail.com>:
>>
>>> Hi I am running into a weird bug in my integration testing.
>>> Following I have built a stack of MyFaces 4.0 with weld as beans
>>> provider and I am getting an NPE sometimes (not reproducible after a
>>> refresh in) AbstractContext.destroyAll(contextualStorage, facesStorage)
>>>
>>> The problem seems to be that that contextualStorage comes in as null and
>>> there is no null check. The weird thing is, that after a full page reload
>>> the error is gone.
>>> I suspect a bug on the myfaces or Weld side for this case.
>>> I null check would fix this, but I am not sure whether there is a deeper
>>> bug in there.
>>>
>>> Can anyone who has more insight in this area comment?
>>>
>>> Cheers
>>>
>>> Werner
>>>
>>>

Re: Bug?

Posted by Werner Punz <we...@gmail.com>.
I am trying but the error is very erratic unfortunately.


Am Mo., 3. Okt. 2022 um 15:05 Uhr schrieb Melloware <mellowaredev@gmail.com
>:

> Werner, if you can isolate it please open a JIRA ticket with the stack
> trace and the info please!
>
>
> On 10/3/2022 8:59 AM, Werner Punz wrote:
>
> Got a little bit further, the null stems from a referenced viewstate id,
> which does not exist anymore in the viewstate map.
> The thing is, that when I trigger the page sequence manually I do not run
> into this. With automation i run into it on a random scale.
> This looks almost like some kind of race condition to me.
>
> I have a problem giving a testreport on it, given i cannot fully isolate
> the issue for now to a reproducible case.
>
>
> Am Mo., 3. Okt. 2022 um 14:07 Uhr schrieb Werner Punz <
> werner.punz@gmail.com>:
>
>> Hi I am running into a weird bug in my integration testing.
>> Following I have built a stack of MyFaces 4.0 with weld as beans provider
>> and I am getting an NPE sometimes (not reproducible after a refresh in)
>> AbstractContext.destroyAll(contextualStorage, facesStorage)
>>
>> The problem seems to be that that contextualStorage comes in as null and
>> there is no null check. The weird thing is, that after a full page reload
>> the error is gone.
>> I suspect a bug on the myfaces or Weld side for this case.
>> I null check would fix this, but I am not sure whether there is a deeper
>> bug in there.
>>
>> Can anyone who has more insight in this area comment?
>>
>> Cheers
>>
>> Werner
>>
>>

Re: Bug?

Posted by Melloware <me...@gmail.com>.
Werner, if you can isolate it please open a JIRA ticket with the stack 
trace and the info please!


On 10/3/2022 8:59 AM, Werner Punz wrote:
> Got a little bit further, the null stems from a referenced viewstate 
> id, which does not exist anymore in the viewstate map.
> The thing is, that when I trigger the page sequence manually I do not 
> run into this. With automation i run into it on a random scale.
> This looks almost like some kind of race condition to me.
>
> I have a problem giving a testreport on it, given i cannot fully 
> isolate the issue for now to a reproducible case.
>
>
> Am Mo., 3. Okt. 2022 um 14:07 Uhr schrieb Werner Punz 
> <we...@gmail.com>:
>
>     Hi I am running into a weird bug in my integration testing.
>     Following I have built a stack of MyFaces 4.0 with weld as beans
>     provider and I am getting an NPE sometimes (not reproducible after
>     a refresh in) AbstractContext.destroyAll(contextualStorage,
>     facesStorage)
>
>     The problem seems to be that that contextualStorage comes in as
>     null and there is no null check. The weird thing is, that after a
>     full page reload the error is gone.
>     I suspect a bug on the myfaces or Weld side for this case.
>     I null check would fix this, but I am not sure whether there is a
>     deeper bug in there.
>
>     Can anyone who has more insight in this area comment?
>
>     Cheers
>
>     Werner
>

Re: Bug?

Posted by Werner Punz <we...@gmail.com>.
Got a little bit further, the null stems from a referenced viewstate id,
which does not exist anymore in the viewstate map.
The thing is, that when I trigger the page sequence manually I do not run
into this. With automation i run into it on a random scale.
This looks almost like some kind of race condition to me.

I have a problem giving a testreport on it, given i cannot fully isolate
the issue for now to a reproducible case.


Am Mo., 3. Okt. 2022 um 14:07 Uhr schrieb Werner Punz <werner.punz@gmail.com
>:

> Hi I am running into a weird bug in my integration testing.
> Following I have built a stack of MyFaces 4.0 with weld as beans provider
> and I am getting an NPE sometimes (not reproducible after a refresh in)
> AbstractContext.destroyAll(contextualStorage, facesStorage)
>
> The problem seems to be that that contextualStorage comes in as null and
> there is no null check. The weird thing is, that after a full page reload
> the error is gone.
> I suspect a bug on the myfaces or Weld side for this case.
> I null check would fix this, but I am not sure whether there is a deeper
> bug in there.
>
> Can anyone who has more insight in this area comment?
>
> Cheers
>
> Werner
>
>