Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DATA RACE in WaitStable #913

Closed
jvegaseg opened this issue Aug 1, 2023 · 2 comments
Closed

DATA RACE in WaitStable #913

jvegaseg opened this issue Aug 1, 2023 · 2 comments
Labels
bug When you are sure about it's a bug

Comments

@jvegaseg
Copy link

jvegaseg commented Aug 1, 2023

Rod Version: v0.114.1

From time to time, there is a data race warning within internal rod code:

`WARNING: DATA RACE
Write at 0x00c000b3ef18 by goroutine 170984:
github.com/go-rod/rod.(*Page).getJSCtxID()
/root/go/pkg/mod/github.com/go-rod/[email protected]/page_eval.go:339 +0x797
github.com/go-rod/rod.(*Page).ensureJSHelper()
/root/go/pkg/mod/github.com/go-rod/[email protected]/page_eval.go:248 +0x52
github.com/go-rod/rod.(*Page).formatArgs()
/root/go/pkg/mod/github.com/go-rod/[email protected]/page_eval.go:233 +0x338
github.com/go-rod/rod.(*Page).evaluate()
/root/go/pkg/mod/github.com/go-rod/[email protected]/page_eval.go:149 +0x5a
github.com/go-rod/rod.(*Page).Evaluate()
/root/go/pkg/mod/github.com/go-rod/[email protected]/page_eval.go:128 +0x57
github.com/go-rod/rod.(*Page).WaitLoad()
/root/go/pkg/mod/github.com/go-rod/[email protected]/page.go:731 +0x244
github.com/go-rod/rod.(*Page).WaitStable.func1()
/root/go/pkg/mod/github.com/go-rod/[email protected]/page.go:698 +0x46
github.com/go-rod/rod/lib/utils.All.func1()
/root/go/pkg/mod/github.com/go-rod/[email protected]/lib/utils/utils.go:164 +0x72
github.com/go-rod/rod/lib/utils.All.func2()
/root/go/pkg/mod/github.com/go-rod/[email protected]/lib/utils/utils.go:168 +0x47

Previous read at 0x00c000b3ef18 by goroutine 170985:
github.com/go-rod/rod.(*Page).Context()
/root/go/pkg/mod/github.com/go-rod/[email protected]/context.go:58 +0x7a
github.com/go-rod/rod.(*Page).WithCancel()
/root/go/pkg/mod/github.com/go-rod/[email protected]/context.go:84 +0x10f
github.com/go-rod/rod.(*Page).WaitRequestIdle()
/root/go/pkg/mod/github.com/go-rod/[email protected]/page.go:604 +0x37a
github.com/go-rod/rod.(*Page).WaitStable.func2()
/root/go/pkg/mod/github.com/go-rod/[email protected]/page.go:703 +0x5c
github.com/go-rod/rod/lib/utils.All.func1()
/root/go/pkg/mod/github.com/go-rod/[email protected]/lib/utils/utils.go:164 +0x72
github.com/go-rod/rod/lib/utils.All.func2()
/root/go/pkg/mod/github.com/go-rod/[email protected]/lib/utils/utils.go:168 +0x47`

My code which generates this warning is this (after navigating to a web page):

err := rod.Try(func() { b.Page.Timeout(options.Timeout).WaitStable(1 * time.Second) // Estable durante 1 segundos })

This issue seems to be related only to internal code of rod.

@jvegaseg jvegaseg added the question Questions related to rod label Aug 1, 2023
@jvegaseg jvegaseg changed the title DATA RACE DATA RACE in WaitStable Aug 1, 2023
@github-actions
Copy link

github-actions bot commented Aug 1, 2023

Please fix the format of your markdown:

40 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]
47 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]

generated by check-issue

@ysmood ysmood added bug When you are sure about it's a bug and removed question Questions related to rod labels Aug 1, 2023
@ysmood ysmood closed this as completed in 48e06d6 Aug 1, 2023
@ysmood
Copy link
Member

ysmood commented Aug 1, 2023

Could you try the latest version, see if it was fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug When you are sure about it's a bug
Projects
None yet
Development

No branches or pull requests

2 participants