You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by mitsm <mi...@gmail.com> on 2017/04/28 06:25:37 UTC
Issue with Search replace functionality in jmeter
Hello,
I was trying to do search and replace in jmeter (3.2 r1790748) for a change
in URL for my application. I did as shown in the snaps below but found that
the search replace was stuck and did not responded even after about 30 mins.
I did a bit of digging using jvisual vm and found that the method
"org.apache.jorphan.util.JOrphanUtils.replaceAllWithRegex()" had the highest
self time and it kept increasing with time (obviously!).
<http://www.jmeter-archive.org/file/n5725533/jMeter_Search_Replace_Snap.png>
<http://www.jmeter-archive.org/file/n5725533/jMeter_Search_Replace_snap_2.png>
<http://www.jmeter-archive.org/file/n5725533/jMeter_Search_Replace_Log.png>
Seems to be a bug. Can i please get some suggestions?
--
View this message in context: http://www.jmeter-archive.org/Issue-with-Search-replace-functionality-in-jmeter-tp5725533.html
Sent from the JMeter - Dev mailing list archive at Nabble.com.
Re: Issue with Search replace functionality in jmeter
Posted by Felix Schumacher <fe...@internetallee.de>.
Am 29.04.2017 um 12:52 schrieb Emilian Bold:
> That's odd, replacing "abc" with "abcd" seems like a common use case. So, it's a bug in replaceAllWithRegex, no?
Yes, that's why I opened the bug.
I would be happy, if you had a look at my patch. It's always good to
have more eyes.
Felix
>
> --emi
>
> Pe 29 apr. 2017, la 12:40, Felix Schumacher <fe...@internetallee.de> a scris:
>
>>> Am 28.04.2017 um 08:25 schrieb mitsm:
>>> Hello,
>>>
>>> I was trying to do search and replace in jmeter (3.2 r1790748) for a change
>>> in URL for my application. I did as shown in the snaps below but found that
>>> the search replace was stuck and did not responded even after about 30 mins.
>>>
>>> I did a bit of digging using jvisual vm and found that the method
>>> "org.apache.jorphan.util.JOrphanUtils.replaceAllWithRegex()" had the highest
>>> self time and it kept increasing with time (obviously!).
>>>
>>> <http://www.jmeter-archive.org/file/n5725533/jMeter_Search_Replace_Snap.png>
>>>
>>> <http://www.jmeter-archive.org/file/n5725533/jMeter_Search_Replace_snap_2.png>
>>>
>>> <http://www.jmeter-archive.org/file/n5725533/jMeter_Search_Replace_Log.png>
>>>
>>> Seems to be a bug. Can i please get some suggestions?
>> I just filed a bug https://bz.apache.org/bugzilla/show_bug.cgi?id=61054
>>
>> The problem is, that you are replacing a string with a string, that includes the search. That leads to an endless loop in JOrphanUtils#replaceAllWithRegex.
>>
>> A simple testcase would be to add a ThreadGroup containing a HTTP Sampler with a Parameter having a key "name" and a value "abc".
>>
>> Now, if one does a find replace with "abc" as the search and "abcabc" as the replacement, "replace all" will never come to a halt :(
>>
>> Regards,
>> Felix
>>
>>>
>>>
>>> --
>>> View this message in context: http://www.jmeter-archive.org/Issue-with-Search-replace-functionality-in-jmeter-tp5725533.html
>>> Sent from the JMeter - Dev mailing list archive at Nabble.com.
>>
Re: Issue with Search replace functionality in jmeter
Posted by Emilian Bold <em...@gmail.com>.
That's odd, replacing "abc" with "abcd" seems like a common use case. So, it's a bug in replaceAllWithRegex, no?
--emi
Pe 29 apr. 2017, la 12:40, Felix Schumacher <fe...@internetallee.de> a scris:
>> Am 28.04.2017 um 08:25 schrieb mitsm:
>> Hello,
>>
>> I was trying to do search and replace in jmeter (3.2 r1790748) for a change
>> in URL for my application. I did as shown in the snaps below but found that
>> the search replace was stuck and did not responded even after about 30 mins.
>>
>> I did a bit of digging using jvisual vm and found that the method
>> "org.apache.jorphan.util.JOrphanUtils.replaceAllWithRegex()" had the highest
>> self time and it kept increasing with time (obviously!).
>>
>> <http://www.jmeter-archive.org/file/n5725533/jMeter_Search_Replace_Snap.png>
>>
>> <http://www.jmeter-archive.org/file/n5725533/jMeter_Search_Replace_snap_2.png>
>>
>> <http://www.jmeter-archive.org/file/n5725533/jMeter_Search_Replace_Log.png>
>>
>> Seems to be a bug. Can i please get some suggestions?
> I just filed a bug https://bz.apache.org/bugzilla/show_bug.cgi?id=61054
>
> The problem is, that you are replacing a string with a string, that includes the search. That leads to an endless loop in JOrphanUtils#replaceAllWithRegex.
>
> A simple testcase would be to add a ThreadGroup containing a HTTP Sampler with a Parameter having a key "name" and a value "abc".
>
> Now, if one does a find replace with "abc" as the search and "abcabc" as the replacement, "replace all" will never come to a halt :(
>
> Regards,
> Felix
>
>>
>>
>>
>> --
>> View this message in context: http://www.jmeter-archive.org/Issue-with-Search-replace-functionality-in-jmeter-tp5725533.html
>> Sent from the JMeter - Dev mailing list archive at Nabble.com.
>
>
Re: Issue with Search replace functionality in jmeter
Posted by Felix Schumacher <fe...@internetallee.de>.
Am 29.04.2017 um 11:40 schrieb Felix Schumacher:
> Am 28.04.2017 um 08:25 schrieb mitsm:
>> Hello,
>>
>> I was trying to do search and replace in jmeter (3.2 r1790748) for a
>> change
>> in URL for my application. I did as shown in the snaps below but
>> found that
>> the search replace was stuck and did not responded even after about
>> 30 mins.
>>
>> I did a bit of digging using jvisual vm and found that the method
>> "org.apache.jorphan.util.JOrphanUtils.replaceAllWithRegex()" had the
>> highest
>> self time and it kept increasing with time (obviously!).
>>
>> <http://www.jmeter-archive.org/file/n5725533/jMeter_Search_Replace_Snap.png>
>>
>>
>> <http://www.jmeter-archive.org/file/n5725533/jMeter_Search_Replace_snap_2.png>
>>
>>
>> <http://www.jmeter-archive.org/file/n5725533/jMeter_Search_Replace_Log.png>
>>
>>
>> Seems to be a bug. Can i please get some suggestions?
> I just filed a bug https://bz.apache.org/bugzilla/show_bug.cgi?id=61054
I have submitted a fix. If you could try the next nightly or build
JMeter from current trunk, it would be nice, if you could tell us, if it
really fixes your problem.
Regards,
Felix
>
> The problem is, that you are replacing a string with a string, that
> includes the search. That leads to an endless loop in
> JOrphanUtils#replaceAllWithRegex.
>
> A simple testcase would be to add a ThreadGroup containing a HTTP
> Sampler with a Parameter having a key "name" and a value "abc".
>
> Now, if one does a find replace with "abc" as the search and "abcabc"
> as the replacement, "replace all" will never come to a halt :(
>
> Regards,
> Felix
>
>>
>>
>>
>> --
>> View this message in context:
>> http://www.jmeter-archive.org/Issue-with-Search-replace-functionality-in-jmeter-tp5725533.html
>> Sent from the JMeter - Dev mailing list archive at Nabble.com.
>
>
Re: Issue with Search replace functionality in jmeter
Posted by Felix Schumacher <fe...@internetallee.de>.
Am 28.04.2017 um 08:25 schrieb mitsm:
> Hello,
>
> I was trying to do search and replace in jmeter (3.2 r1790748) for a change
> in URL for my application. I did as shown in the snaps below but found that
> the search replace was stuck and did not responded even after about 30 mins.
>
> I did a bit of digging using jvisual vm and found that the method
> "org.apache.jorphan.util.JOrphanUtils.replaceAllWithRegex()" had the highest
> self time and it kept increasing with time (obviously!).
>
> <http://www.jmeter-archive.org/file/n5725533/jMeter_Search_Replace_Snap.png>
>
> <http://www.jmeter-archive.org/file/n5725533/jMeter_Search_Replace_snap_2.png>
>
> <http://www.jmeter-archive.org/file/n5725533/jMeter_Search_Replace_Log.png>
>
> Seems to be a bug. Can i please get some suggestions?
I just filed a bug https://bz.apache.org/bugzilla/show_bug.cgi?id=61054
The problem is, that you are replacing a string with a string, that
includes the search. That leads to an endless loop in
JOrphanUtils#replaceAllWithRegex.
A simple testcase would be to add a ThreadGroup containing a HTTP
Sampler with a Parameter having a key "name" and a value "abc".
Now, if one does a find replace with "abc" as the search and "abcabc" as
the replacement, "replace all" will never come to a halt :(
Regards,
Felix
>
>
>
> --
> View this message in context: http://www.jmeter-archive.org/Issue-with-Search-replace-functionality-in-jmeter-tp5725533.html
> Sent from the JMeter - Dev mailing list archive at Nabble.com.
Re: Issue with Search replace functionality in jmeter
Posted by Emilian Bold <em...@gmail.com>.
A reproducible test would be nice.
--emi
On Fri, Apr 28, 2017 at 9:25 AM, mitsm <mi...@gmail.com> wrote:
> Hello,
>
> I was trying to do search and replace in jmeter (3.2 r1790748) for a change
> in URL for my application. I did as shown in the snaps below but found that
> the search replace was stuck and did not responded even after about 30
> mins.
>
> I did a bit of digging using jvisual vm and found that the method
> "org.apache.jorphan.util.JOrphanUtils.replaceAllWithRegex()" had the
> highest
> self time and it kept increasing with time (obviously!).
>
> <http://www.jmeter-archive.org/file/n5725533/jMeter_
> Search_Replace_Snap.png>
>
> <http://www.jmeter-archive.org/file/n5725533/jMeter_
> Search_Replace_snap_2.png>
>
> <http://www.jmeter-archive.org/file/n5725533/jMeter_Search_Replace_Log.png
> >
>
> Seems to be a bug. Can i please get some suggestions?
>
>
>
> --
> View this message in context: http://www.jmeter-archive.org/
> Issue-with-Search-replace-functionality-in-jmeter-tp5725533.html
> Sent from the JMeter - Dev mailing list archive at Nabble.com.
>
Re: Issue with Search replace functionality in jmeter
Posted by UBIK LOAD PACK Support <su...@ubikloadpack.com>.
Hello,
What was your search expression ?
Regards
On Fri, Apr 28, 2017 at 8:25 AM, mitsm <mi...@gmail.com> wrote:
> Hello,
>
> I was trying to do search and replace in jmeter (3.2 r1790748) for a change
> in URL for my application. I did as shown in the snaps below but found that
> the search replace was stuck and did not responded even after about 30
> mins.
>
> I did a bit of digging using jvisual vm and found that the method
> "org.apache.jorphan.util.JOrphanUtils.replaceAllWithRegex()" had the
> highest
> self time and it kept increasing with time (obviously!).
>
> <http://www.jmeter-archive.org/file/n5725533/jMeter_
> Search_Replace_Snap.png>
>
> <http://www.jmeter-archive.org/file/n5725533/jMeter_
> Search_Replace_snap_2.png>
>
> <http://www.jmeter-archive.org/file/n5725533/jMeter_Search_Replace_Log.png
> >
>
> Seems to be a bug. Can i please get some suggestions?
>
>
>
> --
> View this message in context: http://www.jmeter-archive.org/
> Issue-with-Search-replace-functionality-in-jmeter-tp5725533.html
> Sent from the JMeter - Dev mailing list archive at Nabble.com.
>
--
Regards
Ubik Load Pack <http://ubikloadpack.com> Team
Follow us on Twitter <http://twitter.com/ubikloadpack>
Cordialement
L'équipe Ubik Load Pack <http://ubikloadpack.com>
Suivez-nous sur Twitter <http://twitter.com/ubikloadpack>