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

feat: fix issue #1767 #1805

Merged
merged 5 commits into from
Oct 12, 2021
Merged

feat: fix issue #1767 #1805

merged 5 commits into from
Oct 12, 2021

Conversation

lanphan
Copy link
Contributor

@lanphan lanphan commented Oct 2, 2021

I did fix issue #1767 , please help to review.

As I got problems when running "go test", please give me some advice how to run test then I'll add more tests in this PR.

Because this fix relates to documentation, I run "make sdk" to update documentation also.

Related issue(s)

Checklist

Further Comments

@CLAassistant
Copy link

CLAassistant commented Oct 2, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Could you please also add a test for this? Thank you! :)

identity/handler.go Outdated Show resolved Hide resolved
@lanphan
Copy link
Contributor Author

lanphan commented Oct 4, 2021

Hi @aeneasr ,

I got problem when running test "go test -tags sqlite", do you know how to solve it?

lanphan@Lans-MBP identity % go test -tags sqlite
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff6c53370a]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff6c53370a
stack: frame={sp:0x7ffeefbff6d8, fp:0x7ffeefbff728} stack=[0x7ffeefb80778,0x7ffeefbff7e0)
0x00007ffeefbff5d8:  0x01007ffeefbff5f8  0x0000000000000004 
0x00007ffeefbff5e8:  0x000000000000001f  0x00007fff6c53370a 
0x00007ffeefbff5f8:  0x0b01dfacedebac1e  0x0000000000000001 
0x00007ffeefbff608:  0x0000000004036d91 <runtime.throw+0x0000000000000071>  0x00007ffeefbff6a8 
0x00007ffeefbff618:  0x0000000005131154  0x00007ffeefbff660 
0x00007ffeefbff628:  0x0000000004037048 <runtime.fatalthrow.func1+0x0000000000000048>  0x0000000005eafb60 
0x00007ffeefbff638:  0x0000000000000001  0x0000000000000001 
0x00007ffeefbff648:  0x00007ffeefbff6a8  0x0000000004036d91 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff658:  0x0000000005eafb60  0x00007ffeefbff698 
0x00007ffeefbff668:  0x0000000004036fd0 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbff678 
0x00007ffeefbff678:  0x0000000004037000 <runtime.fatalthrow.func1+0x0000000000000000>  0x0000000005eafb60 
0x00007ffeefbff688:  0x0000000004036d91 <runtime.throw+0x0000000000000071>  0x00007ffeefbff6a8 
0x00007ffeefbff698:  0x00007ffeefbff6c8  0x0000000004036d91 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff6a8:  0x00007ffeefbff6b0  0x0000000004036dc0 <runtime.throw.func1+0x0000000000000000> 
0x00007ffeefbff6b8:  0x00000000051490a7  0x000000000000002a 
0x00007ffeefbff6c8:  0x00007ffeefbff718  0x000000000404d1d6 <runtime.sigpanic+0x0000000000000396> 
0x00007ffeefbff6d8: <0x00000000051490a7  0x0000000005eafb60 
0x00007ffeefbff6e8:  0x00007ffeefbff758  0x0000000004027cc6 <runtime.(*mheap).allocSpan+0x0000000000000546> 
0x00007ffeefbff6f8:  0x000000c0009a2bd8  0x000000000412e125 <regexp.makeOnePass.func1+0x0000000000001185> 
0x00007ffeefbff708:  0x000000c000000340  0x0000000000000000 
0x00007ffeefbff718:  0x00007ffeefbff760 !0x00007fff6c53370a 
0x00007ffeefbff728: >0x00007ffeefbff760  0x0000000005c3c000 
0x00007ffeefbff738:  0x0000000000000634  0x00000000043e3f45 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005> 
0x00007ffeefbff748:  0x000000000406c35f <runtime.syscall+0x000000000000001f>  0x000000c0009a3230 
0x00007ffeefbff758:  0x00007ffeefbff7a0  0x000000c0009a3200 
0x00007ffeefbff768:  0x000000000406a190 <runtime.asmcgocall+0x0000000000000070>  0x0000000000000001 
0x00007ffeefbff778:  0x0000000000003800  0x3800000000000200 
0x00007ffeefbff788:  0x00007ffeefbff7a0  0x0000000004062d85 <runtime.wbBufFlush.func1+0x0000000000000025> 
0x00007ffeefbff798:  0x0000000000000e28  0x000000c000000340 
0x00007ffeefbff7a8:  0x000000000406838b <runtime.morestack+0x000000000000008b>  0x0000000000000004 
0x00007ffeefbff7b8:  0x0000000005336630  0x0000000005eafb60 
0x00007ffeefbff7c8:  0x00007ffeefbff818  0x00000000040681a5 <runtime.mstart+0x0000000000000005> 
0x00007ffeefbff7d8:  0x000000000406815d <runtime.rt0_go+0x000000000000013d> 
runtime.throw({0x51490a7, 0x5eafb60})
        /usr/local/Cellar/go/1.17/libexec/src/runtime/panic.go:1198 +0x71
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff6c53370a
stack: frame={sp:0x7ffeefbff6d8, fp:0x7ffeefbff728} stack=[0x7ffeefb80778,0x7ffeefbff7e0)
0x00007ffeefbff5d8:  0x01007ffeefbff5f8  0x0000000000000004 
0x00007ffeefbff5e8:  0x000000000000001f  0x00007fff6c53370a 
0x00007ffeefbff5f8:  0x0b01dfacedebac1e  0x0000000000000001 
0x00007ffeefbff608:  0x0000000004036d91 <runtime.throw+0x0000000000000071>  0x00007ffeefbff6a8 
0x00007ffeefbff618:  0x0000000005131154  0x00007ffeefbff660 
0x00007ffeefbff628:  0x0000000004037048 <runtime.fatalthrow.func1+0x0000000000000048>  0x0000000005eafb60 
0x00007ffeefbff638:  0x0000000000000001  0x0000000000000001 
0x00007ffeefbff648:  0x00007ffeefbff6a8  0x0000000004036d91 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff658:  0x0000000005eafb60  0x00007ffeefbff698 
0x00007ffeefbff668:  0x0000000004036fd0 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbff678 
0x00007ffeefbff678:  0x0000000004037000 <runtime.fatalthrow.func1+0x0000000000000000>  0x0000000005eafb60 
0x00007ffeefbff688:  0x0000000004036d91 <runtime.throw+0x0000000000000071>  0x00007ffeefbff6a8 
0x00007ffeefbff698:  0x00007ffeefbff6c8  0x0000000004036d91 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff6a8:  0x00007ffeefbff6b0  0x0000000004036dc0 <runtime.throw.func1+0x0000000000000000> 
0x00007ffeefbff6b8:  0x00000000051490a7  0x000000000000002a 
0x00007ffeefbff6c8:  0x00007ffeefbff718  0x000000000404d1d6 <runtime.sigpanic+0x0000000000000396> 
0x00007ffeefbff6d8: <0x00000000051490a7  0x0000000005eafb60 
0x00007ffeefbff6e8:  0x00007ffeefbff758  0x0000000004027cc6 <runtime.(*mheap).allocSpan+0x0000000000000546> 
0x00007ffeefbff6f8:  0x000000c0009a2bd8  0x000000000412e125 <regexp.makeOnePass.func1+0x0000000000001185> 
0x00007ffeefbff708:  0x000000c000000340  0x0000000000000000 
0x00007ffeefbff718:  0x00007ffeefbff760 !0x00007fff6c53370a 
0x00007ffeefbff728: >0x00007ffeefbff760  0x0000000005c3c000 
0x00007ffeefbff738:  0x0000000000000634  0x00000000043e3f45 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005> 
0x00007ffeefbff748:  0x000000000406c35f <runtime.syscall+0x000000000000001f>  0x000000c0009a3230 
0x00007ffeefbff758:  0x00007ffeefbff7a0  0x000000c0009a3200 
0x00007ffeefbff768:  0x000000000406a190 <runtime.asmcgocall+0x0000000000000070>  0x0000000000000001 
0x00007ffeefbff778:  0x0000000000003800  0x3800000000000200 
0x00007ffeefbff788:  0x00007ffeefbff7a0  0x0000000004062d85 <runtime.wbBufFlush.func1+0x0000000000000025> 
0x00007ffeefbff798:  0x0000000000000e28  0x000000c000000340 
0x00007ffeefbff7a8:  0x000000000406838b <runtime.morestack+0x000000000000008b>  0x0000000000000004 
0x00007ffeefbff7b8:  0x0000000005336630  0x0000000005eafb60 
0x00007ffeefbff7c8:  0x00007ffeefbff818  0x00000000040681a5 <runtime.mstart+0x0000000000000005> 
0x00007ffeefbff7d8:  0x000000000406815d <runtime.rt0_go+0x000000000000013d> 
runtime.sigpanic()
        /usr/local/Cellar/go/1.17/libexec/src/runtime/signal_unix.go:719 +0x396

goroutine 1 [syscall, locked to thread]:
syscall.syscall(0x43e3f40, 0x1, 0x40487413, 0xc0009a32c0)
        /usr/local/Cellar/go/1.17/libexec/src/runtime/sys_darwin.go:22 +0x3b fp=0xc0009a3230 sp=0xc0009a3210 pc=0x4066c1b
syscall.syscall(0x4076ae6, 0xd0, 0xc0009a32e8, 0x4076a18)
        <autogenerated>:1 +0x26 fp=0xc0009a3278 sp=0xc0009a3230 pc=0x406cb66
golang.org/x/sys/unix.ioctl(0x50fdc95, 0x4, 0x10000000000d0)
        /Users/lanphan/go/pkg/mod/golang.org/x/sys@v0.0.0-20210324051608-47abb6519492/unix/zsyscall_darwin_amd64.go:690 +0x39 fp=0xc0009a32a8 sp=0xc0009a3278 pc=0x43e3839
golang.org/x/sys/unix.IoctlGetTermios(...)
        /Users/lanphan/go/pkg/mod/golang.org/x/sys@v0.0.0-20210324051608-47abb6519492/unix/ioctl.go:73
github.com/mattn/go-isatty.IsTerminal(0x50fdc95)
        /Users/lanphan/go/pkg/mod/github.com/mattn/go-isatty@v0.0.12/isatty_bsd.go:10 +0x50 fp=0xc0009a3318 sp=0xc0009a32a8 pc=0x4af1a30
github.com/fatih/color.init()
        /Users/lanphan/go/pkg/mod/github.com/fatih/color@v1.9.0/color.go:21 +0x7a fp=0xc0009a3350 sp=0xc0009a3318 pc=0x4af237a
runtime.doInit(0x5c4b3a0)
        /usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6498 +0x123 fp=0xc0009a3488 sp=0xc0009a3350 pc=0x40465c3
runtime.doInit(0x5c5b560)
        /usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc0009a35c0 sp=0xc0009a3488 pc=0x4046511
runtime.doInit(0x5c4e420)
        /usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc0009a36f8 sp=0xc0009a35c0 pc=0x4046511
runtime.doInit(0x5c50760)
        /usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc0009a3830 sp=0xc0009a36f8 pc=0x4046511
runtime.doInit(0x5c5a040)
        /usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc0009a3968 sp=0xc0009a3830 pc=0x4046511
runtime.doInit(0x5c4b760)
        /usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc0009a3aa0 sp=0xc0009a3968 pc=0x4046511
runtime.doInit(0x5c4e320)
        /usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc0009a3bd8 sp=0xc0009a3aa0 pc=0x4046511
runtime.doInit(0x5c5d0e0)
        /usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc0009a3d10 sp=0xc0009a3bd8 pc=0x4046511
runtime.doInit(0x5c54900)
        /usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc0009a3e48 sp=0xc0009a3d10 pc=0x4046511
runtime.doInit(0x5c48520)
        /usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc0009a3f80 sp=0xc0009a3e48 pc=0x4046511
runtime.main()
        /usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:238 +0x1e6 fp=0xc0009a3fe0 sp=0xc0009a3f80 pc=0x40393e6
runtime.goexit()
        /usr/local/Cellar/go/1.17/libexec/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc0009a3fe8 sp=0xc0009a3fe0 pc=0x406a481

goroutine 18 [select]:
go.elastic.co/apm.(*Tracer).loop(0xc000416180)
        /Users/lanphan/go/pkg/mod/go.elastic.co/apm@v1.8.0/tracer.go:854 +0xbb5
created by go.elastic.co/apm.newTracer
        /Users/lanphan/go/pkg/mod/go.elastic.co/apm@v1.8.0/tracer.go:420 +0x81e

goroutine 19 [chan receive]:
go.elastic.co/apm.(*Tracer).loop.func1()
        /Users/lanphan/go/pkg/mod/go.elastic.co/apm@v1.8.0/tracer.go:757 +0x1c5
created by go.elastic.co/apm.(*Tracer).loop
        /Users/lanphan/go/pkg/mod/go.elastic.co/apm@v1.8.0/tracer.go:755 +0x3ba

goroutine 10 [select]:
go.elastic.co/apm/transport.(*HTTPTransport).WatchConfig.func1()
        /Users/lanphan/go/pkg/mod/go.elastic.co/apm@v1.8.0/transport/http.go:386 +0x1ea
created by go.elastic.co/apm/transport.(*HTTPTransport).WatchConfig
        /Users/lanphan/go/pkg/mod/go.elastic.co/apm@v1.8.0/transport/http.go:378 +0x12f

goroutine 50 [select]:
github.com/dgraph-io/ristretto.(*defaultPolicy).processItems(0xc000382690)
        /Users/lanphan/go/pkg/mod/github.com/dgraph-io/ristretto@v0.0.3/policy.go:96 +0x8c
created by github.com/dgraph-io/ristretto.newDefaultPolicy
        /Users/lanphan/go/pkg/mod/github.com/dgraph-io/ristretto@v0.0.3/policy.go:80 +0x15b

goroutine 51 [select]:
github.com/dgraph-io/ristretto.(*Cache).processItems(0xc00007e3c0)
        /Users/lanphan/go/pkg/mod/github.com/dgraph-io/ristretto@v0.0.3/cache.go:314 +0xb1
created by github.com/dgraph-io/ristretto.NewCache
        /Users/lanphan/go/pkg/mod/github.com/dgraph-io/ristretto@v0.0.3/cache.go:162 +0x347
exit status 2
FAIL    github.com/ory/kratos/identity  1.648s

@codecov
Copy link

codecov bot commented Oct 4, 2021

Codecov Report

Merging #1805 (ab8ebb6) into master (521b246) will decrease coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1805      +/-   ##
==========================================
- Coverage   74.29%   74.20%   -0.10%     
==========================================
  Files         261      261              
  Lines       12882    12889       +7     
==========================================
- Hits         9571     9564       -7     
- Misses       2667     2678      +11     
- Partials      644      647       +3     
Impacted Files Coverage Δ
identity/handler.go 90.00% <100.00%> (+0.84%) ⬆️
courier/courier.go 58.27% <0.00%> (-10.08%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 521b246...ab8ebb6. Read the comment docs.

@lanphan lanphan changed the title WIP: fix issue #1767 feat: fix issue #1767 Oct 9, 2021
@lanphan
Copy link
Contributor Author

lanphan commented Oct 9, 2021

@aeneasr ,

  • added / updated testcases: DONE
  • run "make format": DONE
  • rebase on master branch: DONE

@lanphan lanphan requested a review from aeneasr October 9, 2021 04:54
@lanphan
Copy link
Contributor Author

lanphan commented Oct 9, 2021

@aeneasr ,

failed e2e tests seems not due to my code, and as I couldn't run e2e tests (got problem as in attachment), I doesn't fix them
Screen Shot 2021-10-09 at 19 09 00

@aeneasr
Copy link
Member

aeneasr commented Oct 10, 2021

#1805 (comment)

That happens because of an outdated golang.org/x/sys dependency which I think broke something on mac with the most recent Go version!

@lanphan
Copy link
Contributor Author

lanphan commented Oct 10, 2021

@aeneasr ,
Let I raise another ticket to post this bug, I think it also relates to e2e test cannot run on my Mac also

@lanphan
Copy link
Contributor Author

lanphan commented Oct 10, 2021

@aeneasr ,
Please help to check issue #1827

Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@aeneasr aeneasr merged commit 29c060b into ory:master Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants