esp-wifi and esp-storage seem to interact very badly on ESP32S3

Attempts to read flash storage while BLE is active seem to cause crashes.
I do not have wifi enabled, only BLE.
The following GIST demonstrates it :
https://gist.github.com/dberlin/acbc1a1dbb9d12dbf44ec6a1fc3ce56c
Note that it won't even get to the real read part. It will crash on the new() call since flashstorage internally reads flash.
If you remove the wifi init, it will work fine.
Otherwise this crashes consistently with the following backtrace:
Init!
DEBUG - ble init
DEBUG - BT controller compile version 80abacd
DEBUG - !!!! unimplemented srand 288
DEBUG - The btdm_controller_init was initialized
Exception occured 'IllegalInstruction'
Context
PC=0x4037df38       PS=0x00060735
0x4037df38 - ram_chip_i2c_writeReg
at ??:??
0x00060735 - PS_WOE
at ??:??
A0=0x8003589a       A1=0x3fcd0af0       A2=0x40055bc0       A3=0x00000000       A4=0x02000000
0x8003589a - _rtc_fast_bss_end
at ??:??
0x3fcd0af0 - _stack_start_cpu0
at ??:??
0x40055bc0 - rom_rx_gain_force
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x02000000 - PS_WOE
at ??:??
A5=0x059e0966       A6=0x05000966       A7=0xffffffff       A8=0x8037df38       A9=0x3fcd0ad0
0x059e0966 - PS_WOE
at ??:??
0x05000966 - PS_WOE
at ??:??
0xffffffff - _rtc_fast_bss_end
at ??:??
0x8037df38 - _rtc_fast_bss_end
at ??:??
0x3fcd0ad0 - _stack_start_cpu0
at ??:??
A10=0x00000000      A11=0x04920966      A12=0x6000e000      A13=0x00000900      A14=0x40000648
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x04920966 - PS_WOE
at ??:??
0x6000e000 - _rtc_slow_data_end
at ??:??
0x00000900 - VECTORS_SIZE
at ??:??
0x40000648 - uart_tx_one_char
at ??:??
A15=0x00060b20
0x00060b20 - PS_WOE
at ??:??
SAR=0000001c
EXCCAUSE=0x00000000 EXCVADDR=0x00000000
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
LBEG=0x4201767d     LEND=0x420176aa     LCOUNT=0x00000000
0x4201767d - esp_recover_efuse_data
at ??:??
0x420176aa - esp_recover_efuse_data
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
THREADPTR=0x00000000
0x00000000 - RESERVE_RTC_SLOW
at ??:??
SCOMPARE1=0x00000000
0x00000000 - RESERVE_RTC_SLOW
at ??:??
BR=0x00000000
0x00000000 - RESERVE_RTC_SLOW
at ??:??
ACCLO=0x00000000    ACCHI=0x00000000
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
M0=0x00000000       M1=0x00000000       M2=0x00000000       M3=0x00000000
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
F64R_LO=0x00000000  F64R_HI=0x00000000  F64S=0x00000000
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
FCR=0x00000000      FSR=0x00000000
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
F0=0x00000000       F1=0x00000000       F2=0x00000000       F3=0x00000000       F4=0x00000000
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
F5=0x00000000       F6=0x00000000       F7=0x00000000       F8=0x00000000       F9=0x00000000
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
F10=0x00000000      F11=0x00000000      F12=0x00000000      F13=0x00000000      F14=0x00000000
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x00000000 - RESERVE_RTC_SLOW
at ??:??
F15=0x00000000
0x00000000 - RESERVE_RTC_SLOW
at ??:??
0x40035939
0x40035939 - rom_rx_gain_force
at ??:??
0x42019138
0x42019138 - i2c_bbpll_set
at ??:??
0x42015cda
0x42015cda - rf_init
at ??:??
0x420160be
0x420160be - register_chipv7_phy
at ??:??
0x420031f7
0x420031f7 - _ZN8esp_wifi10initialize17ha88d903e976453c3E
at ??:??
0x42000ce7
0x42000ce7 - main
at ??:??
0x4200530e
0x4200530e - Reset
at ??:??
0x403795c6
0x403795c6 - ESP32Reset
at ??:??
0x40000000
0x40000000 - _external_ram_end
at ??:??
0x403cdb78
0x403cdb78 - _text_heap_end
at ??:??

Oh even more interesting.
If I make a Cargo.toml that has these settings:
[profile.dev.package.esp-wifi]
opt-level = 3
And compile it in dev mode, it works.
It will still crash in release mode even with no profile options
If i reset release mode to opt_level=1 it works.
If i set it at opt_level=2 or above it fails.
Maybe a critical section is being removed or something?
I won't have time to look at the assembly today, but hopefully this will enable easy comparison and tracking down.

Could you try with "-Ctarget-feature=-loop"? in your rust flags?

This causes invalid assembly:
error: could not compile xtensa-lx-rt due to 7 previous errors
warning: build failed, waiting for other jobs to finish...
error: invalid operand for instruction
--> /home/dannyb/.cargo/registry/src/github.com-1ecc6299db9ec823/xtensa-lx-rt-0.15.0/src/exception/assembly_esp32.rs:128:9
|
128 |         rsr     a3,  LBEG
|         ^
|
note: instantiated into assembly here
--> :22:22
|
22  |         rsr     a3,  LBEG
|                      ^

Alongside I have a dumb question though:
I was looking at what esp-idf does in the spiflash driver, and it appears it waits for the SPI bus to go idle before doing reads/writes through the esp_rom_* functions
The esp-storage code does not.
Is I2C on the same SPI as flash storage?
If so, i would bet that's the issue and the compiler is just making us get lucky.

Hmm, that's odd. Can you pass it in the flags via .cargo/config.toml instead? Perhaps the feature detection isn't working properly when passing via environment variable.

That is in .cargo/config.toml, unfortunately.
On Mon, Mar 20, 2023 at 10:27 AM Scott Mabin @.***>
wrote:

Hmm, that's odd. Can you pass it in the flags via .cargo/config.toml
instead? Perhaps the feature detection isn't working properly when passing
via environment variable.
—
Reply to this email directly, view it on GitHub
https://github.com/esp-rs/esp-storage/issues/5#issuecomment-1476334799,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACPI22SERQJBMMXDCPZ4G3W5BSN5ANCNFSM6AAAAAAWBDLATE
.
You are receiving this because you authored the thread.Message ID:
@.***>

FYI I can successfully build the examples-esp32s3 in the esp-wifi repo with the following flags:
rustflags = [
    "-C", "link-arg=-Tlinkall.x",
    "-C", "link-arg=-Trom_functions.x",

    "-C", "target-feature=-loop"
]

Could you try that?

Let me see what i can make work.
If not,  I may just disassemble the code and rom and see if there is anything obvious

It is an existing issue, which a couple of people have run into already, see https://github.com/esp-rs/rust/issues/161 & https://github.com/esp-rs/rust/issues/164, which is why I mentioned it.
Fortunately, we will hopefully have a fix in our LLVM Xtensa backend soon! Currently testing a fix internally :).

Sorry that you're running into that issue - hopefully it will be fixed soon! Thanks again for the report, and help with debugging :).


x/tools/internal/lsp/regtest: test output is much too verbose

What version of Go are you using (go version)?

~/src/golang.org/x/tools$ go version
go version devel +810c27e9be Wed May 13 11:59:26 2020 +0000 linux/amd64

Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
go env Output
~/src/golang.org/x/tools$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/usr/local/google/home/bcmills/.cache/go-build"
GOENV="/usr/local/google/home/bcmills/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/usr/local/google/home/bcmills/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/usr/local/google/home/bcmills"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/google/home/bcmills/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/google/home/bcmills/go/pkg/tool/linux_amd64"
GCCGO="/usr/local/google/home/bcmills/bin/gccgo"
GOAMD64="alignedjumps"
AR="ar"
CC="gcc"
CXX="c++"
CGO_ENABLED="1"
GOMOD="/usr/local/google/home/bcmills/src/golang.org/x/tools/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build713277181=/tmp/go-build -gno-record-gcc-switches"

What did you do?
~/src/golang.org/x/tools$ git fetch "https://go.googlesource.com/tools" refs/changes/12/234112/3 && git checkout FETCH_HEAD

~/src/golang.org/x/tools$ go test ./internal/lsp/regtest >regtest.txt

~/src/golang.org/x/tools$ du -h regtest.txt
108K    regtest.txt

What did you expect to see?
A comprehensible, human-readable report of test failures, along with a small amount of contextual information relevant to those failures.
What did you see instead?
108 KiB of unfiltered logs that appear to be mostly irrelevant to the actual test case that failed.
It appears that something within the test is piping all output of subprocesses directly to os.Stdout or os.Stderr, rather than saving the output to a buffer and using t.Logf or similar to associate the buffered logs with a specific test case.
CC @findleyr @stamblerre @ianthehat

I agree, though some of this output was added to help diagnose hard-to-reproduce flakes:

gopls RPC logs
goroutine profile

I'll see if there's somewhere else I can write these artifacts.


File import issues for rust folder

Data folder and its component files should be located in Native folder for rust backend. However, the import statement seems to break or is unable to locate and read files from the lib folder

The fix for this is to let Rust flutter bridge speak between rust and flutter lib and native folder


Implement push on shutdown

After issuing a Ctrl+C, the program should try to push to the repo.
If it fails, warn the user that it failed and possibly why.

We should also add a flag (and maybe config) allowing the user to decide whether push is enabled or not.
Unsure what the default should be as when I spec'd nabu it was supposed to push

Additionally, before pushing, the current repo state should be staged and commited.


Manifest merger failed

Unable to have the following in my app manifest:
android:allowBackup="false"
Please fix this by removing the allowBackup attribute, thank you!

thank you for report ,I noticed this problem， and will update library soon .

Thank you! (:

you can use  compile 'com.mxn.soul:flowingdrawer-core:1.2.5'  and fix this .


cf curl on Bash for Windows returns an error

Command
cf curl "/v2/service_instances/<service_instance_id>"
What occurred
GET /C:/Program%20Files/Git/v2/service_instances/5c6b56d4-53d6-4130-9a4e-f57fb9f7f718 HTTP/1.1
Host: api.cf.mydomain.com
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
Connection: close
Content-Type: application/json
User-Agent: go-cli 6.34.1+bbdf81482.2018-01-17 / windows

RESPONSE: [2018-02-19T06:09:42+05:30]
HTTP/1.1 404 Not Found
Connection: close
Content-Length: 86
Content-Type: application/json;charset=utf-8
Date: Mon, 19 Feb 2018 00:39:42 GMT
Server: nginx
X-Cascade: pass
X-Content-Type-Options: nosniff
X-Ratelimit-Limit: 40000
X-Ratelimit-Remaining: 39978
X-Ratelimit-Reset:<PHONE_NUMBER>
X-Vcap-Request-Id: afee2a4c-5f13-4f86-466b-944bc3fb6450::04c6b221-21fe-43a5-ae88-75287c890541

{
  "description": "Unknown request",
  "error_code": "CF-NotFound",
  "code": 10000
}

What you expected to occur
I would expect the cf curl to work smoothly on Bash on Windows.
CLI Version
 cf -v
cf.exe version 6.34.1+bbdf81482.2018-01-17

CC API Endpoint Version
api version:    2.101.0
CF Trace
See above
Platform & Shell Details
Windows 10, with Bash Shell for Windows
Any other relevant information
As can be seen in the cf curl debug output, the CLI wrongly sends the CC request to a path, which contains the filesystem path prefixed.

Hey @abh1kg ,
We don't currently have support WSL namely because go doesn't support WSL. We'll keep this issue open, should golang's support change. Our current supported terminals on Windows are command prompt and Powershell.

Closing as the CF CLI doesn't support this.


Noisy logging of health check requests

We use the /health endpoint as a Kubernetes readiness probe which results in a lot log noise because it gets called every few seconds.
Could we suppress logging of the /health endpoint if it returns a 200 response?
Happy to make a PR but looking for confirmation of:

is the proposal OK?
should I bother making it a configurable setting?
if so, should it be off or on by default?

👍  sure, this sounds good to me.

should I bother making it a configurable setting?

No, let's just always disable logging of the health endpoint.


Release v0.8.0

Breaking changes

Most APIs that relied on rigid-body handles or collider handles have been modified to rely on RigidBody
or Collider objects instead. Handles are now only needed for events and hooks.
Rename STATIC to FIXED in the ActiveCollisionTypes flags.

Added

Add a lines-based debug-renderer. See #119 for examples of
integration of the debug-renderer with THREE.js and PIXI.js.
Each rigid-body, collider, impulse joint, and multibody joint now have a unique object instance. This instance
in only valid as long as the corresponding objects is inserted to the World.
Add a wakeUp: bool argument to the World.createImpulseJoint and MultibodyJointSet::createMultibodyJoint to
automatically wake-up the rigid-bodies attached to the inserted joint.
Add a filter callback to all the scene queries. Use this for filtering more fine-grained than collision groups.
Add collider.shape that represents the shape of a collider. This is a more convenient way of reading the collider’s
shape properties. Modifying this shape will have no effect unless collider.setShape is called with the modified shape.
Add Collider.containsPoint, .projectPoint, .intersectsRay, .castShape, .castCollider, .intersectsShape,
.contactShape, .contactCollider, .castRay, .castRayAndGetNormal.
Add Shape.containsPoint, .projectPoint, .intersectsRay, .castShape, .intersectsShape,
.contactShape, .castRay, .castRayAndGetNormal.
Add World.projectPointAndGetFeature which includes the feature Id the projected point lies on.
Add RigidBodyDesc.sleeping to initialize the rigid-body in a sleeping state.

Nice! Does this one includes the changes to the joints (making them less energetic)?


add neptune run/send inference to drop cloud_mode option

neptune send needs an aditional cloud_mode flag which is annoying.
Add send vs run inference.

@buus2 @jakubczakon merged in #61


ochala issue

Setup: GitHub

[x] created this issue
[x] assigned myself
[x] moved the issue to the project board

Setup: local

[x] pulled the most recent code from main/master
[x] created a new branch for my introduction

Writing the content:

[x] added my intro file in /people according to group conventions
[x] linked to my file from /README.md according to group conventions

Before pushing my branch:

[x] formatted the code
[x] fixed all spelling mistakes and added new words to the dictionary
[x] fixed all linting mistakes

After pushing my branch:

[ ] created a new PR linked to this issue
[x] make sure all of the checks passed
[x] assigned someone to review and merge my PR

issue checked


SSL Factory is greyed out on new connection with remote PostgreSQL

Hi guys
It seems that in latest version (5.2.3) the SSL Factory drop down is not enabled or not populated. It works fine on 5.1.6 (and older).
I'm on Ubutnu 18.04 trying to connect to a remote PostgreSQL (Heroku)
Kind regards

Could you post a screenshot? Because in my env it works ok.
Also maybe there are some related errors in debug log? (https://github.com/dbeaver/dbeaver/wiki/Log-files)

Thanks for your reply, I'm afraid I can't reproduce it now. After uninstalling 5.1.6 and re-installing 5.2.3, it works


[bug]: Missing features on the Web UI

Is there an existing issue for this?

[X] I have searched the existing issues

OS
Linux
GPU
cuda
VRAM
8GB
What version did you experience this issue on?
Commit a3c5a664e597e694c71e654ac0a9689639e2952b on the main branch
What happened?
(Running under Docker, latest commit on main as of the creation of this issue)
When using the Web UI, certain features described on the documentation appear to be missing.
On the Unified Canvas, under the "Infill and Scaling" tab, there is no slider for the "Inpaint Replace" setting.
On the text2img tool, there are no options for LoRA or LyCORIS.
I've tried:

pulling the latest commit multiple times
adding a line purging the pip cache to the Dockerfile
forcing Docker to build the image with --no_cache by adding it to the build command in build.sh

To no avail.
Furthermore, greping for inpaint_replace shows multiple .ts files with the string, indicating that maybe the code is present but somehow the build step for the .ts files is not executing correctly (?). This is unfortunately just a guess, as I am not very familiar with TypeScript, and could not progress any further with debugging.
Screenshots
No response
Additional context
No response
Contact Details
No response

Hi, please see the announcement here: https://github.com/invoke-ai/InvokeAI/discussions/3246
In short, check out the tag pre-nodes to get a working UI.
I'll update the readme on main with an alert about this.

Thanks for the response :)


[Feature] HTTP Cache

Motivation:
HTTP caching is a nice feature of HTTP and we should support it in Netty so that everyone can benefit from this feature.
Modification:
Imported code from #8425 to implement HTTP Caching.
Result:
Fixes #2646

\cc @normanmaurer @chrisvest @madgnome @m0wfo @slandelle
PTAL guys.

Not sure it makes sense to have HttpCache and HttpCacheStorage separate like that, but it's certainly important that the caching implementation can be injected so people can use Caffeine or Guava. A default implementation could be based on a synchronised LinkedHashMap. The cache entry key could be typed as Serializable. This can allow key generators to be more efficient and produce less garbage, compared to mandating String.
There are a number of TODOs, style errors, and license headers with wrong year.

@slandelle Is there any tool to check HTTP Cache Implementation spec?

@slandelle Not that I'm aware of.

Will do fresh PR after addressing all comments.


Add SQL binding command should be available on file explorer context menu

It would be handy to have it show up on right click for cs files instead of just through command palette

@Charles-Gagnon @chlafreniere @dzsquared Thoughts on the ordering for "Add SQL Binding" in the context menu?

Something like that looks great @lucyzhang929
What @dzsquared said would be good though, if there's a way to make this only show up when we detect that it's a functions project that would be great. I think you might be able to achieve something like this using a custom context and the 'in' clause : https://code.visualstudio.com/api/references/when-clause-contexts#in-conditional-operator
(there may be a better way of doing it though, feel free to look through the options there and see if you can think of any other ways to get what we want)
This might be something we punt though - that's probably going to be a bit more work to hook it all up and while useful it isn't something we need right away.

Yep right now the only condition we check is that the file is csharp so it can be annoying/confusing for users not in a functions project. I'll check if theres an easy way to hook up the custom context, if not we can punt this.


The pagesize parameter is not taken effect during the pageable operation

This issue was found in this PR when correcting the format of maxpagesize parameter of the pageable operations from string to int.
From the code, the parameter maxpagesize isn't passed correctly to the delegate func:

Then the test failed, as the maxpagesize is missing in the query parameter:

After digging into the code, the problem is not caused by the delegate func, but the GeneratorPageableHelpers.CreatePageable, which doesn't have a pagesize parameter:

However, the PageableHelpers.PageableImplementation has  a pagesize parameter:

So the fixing should take 2 steps:

Add a overloading function which exposes the pagesize parameter, and pass it to PageableHelpers.PageableImplementation.
Fix the CodeGen to support it.

regen PR: https://github.com/Azure/azure-sdk-for-net/pull/47669


track and implement W3C Social API

Social API is an emerging W3C standard API for interacting with social data and services...? looks like it could be a/the successor to the OpenSocial API that granary's python API and REST service largely implement.

http://w3c-social.github.io/SocialAPI/socialapi
https://github.com/w3c-social/SocialAPI/blob/gh-pages/socialapi.md

this is mostly just a tracking issue for now until Social API is more fleshed out, but it's interesting to follow. cc @rhiaro, feel free to correct anything here.

:+1:

i actually misunderstood that Social API draft. it's not  a new API, but an overview comparison of existing APIs in the space, including ActivityPump, micropub + webmention, SoLiD, PuSH, etc.
sooo... I'm going to close this. move along, nothing to see here.


filter_by_fasta_id: speedup by using set

For longer id lists the tool was horribly slow. I suggest to use set instead of list to store the ID list which speeds up the calculations dramatically and should not hurt in other respects.

Failing test seems unrelated.

Was ist denn das für ein Fehler, narf ...

I would also suggest using dictionaries (by making accession ids as key and
its corresponding sequence, including header, as values). This makes it
much faster.
On Mon, May 13, 2019 at 1:25 AM M Bernt<EMAIL_ADDRESS>wrote:

For longer id lists the tool was horribly slow. I suggest to use set
instead of list to store the ID list which speeds up the calculations
dramatically and should not hurt in other respects.
You can view, comment on, or merge this pull request online at:
https://github.com/galaxyproteomics/tools-galaxyp/pull/378
Commit Summary

filter_by_fasta_id: speedup by using set

File Changes

M tools/filter_by_fasta_ids/filter_by_fasta_ids.py
https://github.com/galaxyproteomics/tools-galaxyp/pull/378/files#diff-0
(4)
M tools/filter_by_fasta_ids/filter_by_fasta_ids.xml
https://github.com/galaxyproteomics/tools-galaxyp/pull/378/files#diff-1
(2)

Patch Links:

https://github.com/galaxyproteomics/tools-galaxyp/pull/378.patch
https://github.com/galaxyproteomics/tools-galaxyp/pull/378.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/galaxyproteomics/tools-galaxyp/pull/378, or mute the
thread
https://github.com/notifications/unsubscribe-auth/ABNKOBIVQBDZ7AHLNQXH75TPVECVPANCNFSM4HMMWI2Q
.

@pravs3683 thanks for the suggestion, but I don't see how this could help.

hooray

@pravs3683 the set() should not be slower then a dict() right?
I'm going to megre this.
Thanks @bernt-matthias!

Thanks @bgruening . Has galaxyp an automatic upload to the toolshed?

Yes. But the packages failed to upload on master. So I pushed manually this time. Check again.


Support for Java 11

Fix compilation and deployment issues on Java 11 and update Spring dependencies.

Fixed in branch issues/63-java-11.


The code style doesn't like java,it looks like c/c++

Can we change the code style to java?

Can you clarify what you mean by this? Which code looks like c/c++?

public class MicrometerMetricsTracker implements IMetricsTracker
{
...
}

I usually like this
public class MicrometerMetricsTracker implements IMetricsTracker {
...
}

Yea, we won't change this coding format. And the style isn't specifically a "c/c++" style. It is just a subjective choice.
Ironically, the style you are asking for is often referred to as the Kernighan and Ritchie style (old school C).


150322-1608/ fix link in Cards for internationalisation

CardActionArea href links ignore internationalisation so have made the component a link component which seems to fix it

Looks fine. I just had an issue locally which would be good to understand. I clicked approve before I checked !


Remove Legacy Code

Throughout the codebase there are various pieces of legacy code. These need to be removed.

Sprite
Drawable (or Renderable

Can I ask what's wrong with Drawable, and how it should look instead?

@EtienneBruines It fulfils the same purpose as Renderable, although... Perhaps we should use it... Renderable is quite ugly and relies on moving state.

@paked Using either one of those would indeed be better; as they both sound like they're doing the same.

@EtienneBruines I personally think Drawable is the better design (not sure why I wrote it down then...)
cc: @matiwinnetou

very useful info, thx. Helps me to learn the current status of the project.

@matiwinnetou Do you have any opinions on Drawable vs Renderable?

@paked At the moment sadly no, as I understand still too little the difference. In general, however, from my experience I can say that one should avoid state like fire. It is not always possible though or complicates code a lot. You mentioned that Drawable has no state where as Renderable assumes state.
In our ECS app, which believe or not is actually web application. (We created own ecs-web framework in Java 8 we have even various Worlds, like ImmutableWorld, RequestWorld (mutable world), to make this separation clear. In our design worlds form a chain, where a world can have a parent attached.

@EtienneBruines What about you? (Drawable vs Renderable )

I do think the Drawable is much clearer. Since there'll be a Shader for each PriorityLevel (which people can add themselves), all we need from whatever we want to draw, is the Texture, and size/location.
I have no idea what the View() (float32, float32, float32, float32) function is supposed to do though.


Non-existing file show up in the Documents list

I searched for “png” on Documents page then click “Download” on categories.png but I got “general server error”. Is it possible to not show non-existing docs in the list?

no, but this is not a case that should exist anywhere except a test server (and instances of it should just be reported).  This should only happen when the data was deleted on the disk but the references in the database were not cleaned up.


Witness flag erroneously activated on PoS networks

In the constructor of NetworkPeerConnectionParameters:
        public NetworkPeerConnectionParameters()
        {
            this.Version = ProtocolVersion.PROTOCOL_VERSION;
...
            this.PreferredTransactionOptions = TransactionOptions.All;

This seems to mean that, regardless of the protocol version defined in Program.cs for StratisD (70000), when handshaking with a peer we bump it up to PROTOCOL_VERSION (70012) and enable the witness flag in the transaction options.
I am not entirely sure if there are adverse consequences for this being enabled. but it does mean that we incorrectly say we want blocks with witness data when constructing getdata payloads (e.g. in the block puller), for instance:
[2018-11-08 01:43:41.0731 29] TRACE: Stratis.Bitcoin.P2P.Peer.NetworkPeer.AddSupportedOptions (inventoryType:MSG_BLOCK)
[2018-11-08 01:43:41.0731 29] TRACE: Stratis.Bitcoin.P2P.Peer.NetworkPeer.AddSupportedOptions (-):MSG_WITNESS_BLOCK

Hmmm ok I will have a look at this, we are upgrading protocol version for PH so it might cause ripple effects, but we should actually not enable witness unless its activated

Looking into this in more detail, the reason why the version is incorrectly set is actually due to the following:
ConnectionManager calls CreateNetworkPeerServer without specifying the version parameter:
NetworkPeerServer server = this.NetworkPeerFactory.CreateNetworkPeerServer(listen.Endpoint, this.ConnectionSettings.ExternalEndpoint);

NetworkPeerFactory.CreateNetworkPeerServer() instantiates a NetworkPeerServer which propagates the erroneous version into its Version property:
return new NetworkPeerServer(this.network, localEndPoint, externalEndPoint, version, this.loggerFactory, this, this.initialBlockDownloadState, this.connectionManagerSettings);

It looks like this affects all inbound peers via the following:
        private NetworkPeerConnectionParameters CreateNetworkPeerConnectionParameters()
        {
            IPEndPoint myExternal = this.ExternalEndpoint;
            NetworkPeerConnectionParameters param2 = this.InboundNetworkPeerConnectionParameters.Clone();
            param2.Version = this.Version;
            param2.AddressFrom = myExternal;
            return param2;
        }

I believe the transaction options causing witness requirements are still coming from the default setting in NetworkPeerConnectionParameters though.

Hi @zeptin, can you trace "version" payloads and check that it is indeed the case that we send version as 70012?

Probably the fix here should be to separate the services and make it per network (same like the refactor coming for NetwworkProtocol enum).


#handle is jumping while dragging

Reproducible here: https://www.webcomponents.org/element/vaadin/vaadin-split-layout
(Chrome/Linux)

Also, this jumpy behavior produces this bad-looking effect when two handles in the same line are not aligned the same vertically:


Paper: Deep Mutual Learning

Paper Link: https://arxiv.org/abs/1706.00384

Description
Rather than one way transfer between a teacher and a student, an ensemble of students learn collaboratively and teach each other throughout the training process

This paper uses multiple students with different initial weights. However, to preserve our API, I was thinking of taking one student, making copies of it and adding Gaussian noise to the weights of the copies.
That should have have the same effect right ? @Het-Shah

Yea to preserve the current API you can add a term in the __init__ as well for the number of students you would want, and then take the approach as you said. Or you can make a list of students instead of one student (this will give freedom of architecture as well like different architectures for the students).

Hmmm. The second option seems better. But then we''ll have to take in a list of optimizers as well. Wouldn't that be a bit messy ?

We already are doing such an implementation right? The TAKD one has this sort of approach afaik.


Update instructions for AWS ElasticSearch

Fix instructions for AWS ElasticSearch configuration in README as it is outdated.

Thanks!

Thanks!


Could not connect to Ryuk at localhost:49154 on Docker for Windows

Hi,
I am using Docker Desktop on Windows 10.
Version 3.0.0 (50684)
Engine: 20.10.0
Compose: 1.27.4
Kubernetes: v1.19.3
Notary: 0.6.1
Credential Helper: 0.6.3
Snyk: v1.432.0
When running my test I see that the docker container for Ryuk is created and running.
But my test tells me "Could not connect to Ryuk at localhost:49154".
Can somebody help?
Thanks!
Failed to load ApplicationContext
java.lang.IllegalStateException: Failed to load ApplicationContext
    at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:132)
    at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:123)
    at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:118)
    at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)
    at org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener.prepareTestInstance(SpringBootDependencyInjectionTestExecutionListener.java:43)
    at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:244)
    at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:98)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$6(ClassBasedTestDescriptor.java:350)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:355)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$7(ClassBasedTestDescriptor.java:350)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
    at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312)
    at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)
    at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)
    at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)
    at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:349)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$4(ClassBasedTestDescriptor.java:270)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:269)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$2(ClassBasedTestDescriptor.java:259)
    at java.base/java.util.Optional.orElseGet(Optional.java:369)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$3(ClassBasedTestDescriptor.java:258)
    at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:101)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:100)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:65)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$1(NodeTestTask.java:111)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:111)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:79)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask$DefaultDynamicTestExecutor.execute(NodeTestTask.java:212)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask$DefaultDynamicTestExecutor.execute(NodeTestTask.java:192)
    at org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor.execute(TestTemplateTestDescriptor.java:139)
    at org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor.lambda$execute$2(TestTemplateTestDescriptor.java:107)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
    at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:442)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
    at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
    at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)
    at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
    at org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor.execute(TestTemplateTestDescriptor.java:107)
    at org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor.execute(TestTemplateTestDescriptor.java:42)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248)
    at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211)
    at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:132)
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99)
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79)
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75)
    at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
    at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
    at com.sun.proxy.$Proxy5.stop(Unknown Source)
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:133)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
    at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
    at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
    at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration$LiquibaseConfiguration.class]: Invocation of init method failed; nested exception is com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Could not connect to Ryuk at localhost:49154
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1794)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:311)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1109)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
    at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:120)
    at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99)
    at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124)
    ... 145 more
Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Could not connect to Ryuk at localhost:49154
    at com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:595)
    at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:581)
    at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
    at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
    at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:311)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1853)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1790)
    ... 164 more
Caused by: java.lang.IllegalStateException: Could not connect to Ryuk at localhost:49154
    at org.testcontainers.utility.ResourceReaper.start(ResourceReaper.java:198)
    at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:205)
    at org.testcontainers.LazyDockerClient.getDockerClient(LazyDockerClient.java:14)
    at org.testcontainers.LazyDockerClient.authConfig(LazyDockerClient.java:12)
    at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:310)
    at org.testcontainers.jdbc.ContainerDatabaseDriver.connect(ContainerDatabaseDriver.java:118)
    at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:121)
    at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:358)
    at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
    at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:477)
    at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:560)
    ... 169 more

Hey, had the same issue with my projects, for some reason Ryuk started failing and I was only able to get my project to build by disabling ryuk via environment vars in Maven failsafe. e.g.
<plugin>                      <groupId>org.apache.maven.plugins</groupId>                      <artifactId>maven-failsafe-plugin</artifactId>                      <executions>                          <execution>                              <goals>                                  <goal>verify</goal>                                  <goal>integration-test</goal>                              </goals>                              <configuration>                                  <argLine>@{argLine}</argLine>                                  <systemPropertyVariables>                                      <java.security.egd>file:/dev/./urandom</java.security.egd>                                  </systemPropertyVariables>                                  <environmentVariables>                                      <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>                                  </environmentVariables>                                  <trimStackTrace>false</trimStackTrace>                              </configuration>                          </execution>                      </executions>                  </plugin>

Hi @abe546 ,
Disabling it via environment variable TESTCONTAINERS_RYUK_DISABLED did the trick.
At least the tests run again.
I also had to put the ip of registry-1.docker.io in /Windows/System32/drivers/etc/hosts file:
<IP_ADDRESS> registry-1.docker.io
Still, it looks like a bug.

Additional info: After running my test once with TESTCONTAINERS_RYUK_DISABLED=true i was able to run the tests again without this environment variable.
I don´t know why but now it works also without TESTCONTAINERS_RYUK_DISABLED=true.

Just started out with TestContainer and got the same error on my first run. Really disappointed. 😢

May I add something, as the issue still open? I've come to the same problem on Windows and Docker Desktop versions.
The thing is: localhost address was resolving to the IPV6, but the ports were accessable only through IPV4. Although the problem persisted only for the random port ranges. So, any given port, i.e. 49156, would not respond, even though I'd started the docker containers myself.
As a workaround - because disabling Ryuk would not resove it at all, once ports still needed to test my API - I used an etc/hosts entry, forcing <IP_ADDRESS> address so I could point TESTCONTAINERS_HOST_OVERRIDE env to it and go ahead with my integration tests.
The only observations I have are that I'm using WSL2 plus MicroShed Test Framework and that I do not know if the first is interfering in some way.

@almde89 , how is your etc/hosts?
<IP_ADDRESS> host.docker.internal
Then you set on env variables:
TESTCONTAINERS_HOST_OVERRIDE  = host.docker.internal

Yeap, I used the same entry. I set it on my IDE as an Environment Variable and it worked. But first, I would recommend seeing if the IPV6 problem is the case.

Hello,
I've got the same issue : "Can not connect to Ryuk at localhost:xxxxx" due to a java.net.ConnectException: Connection refused
I'm on :

Windows 10
Docker Desktop 3.0.0 with WSL2
Test Container Version 1.15.1

I'm running my tests with IntelliJ on windows not in WSL2
My workaround : disable WSL2 and switch back to hyper V

@fb33 , same situation here.
After my post, I didn't work on my code again. When I ran it today it worked, no change.

Can somebody try adding -Djava.net.preferIPv4Stack=true to the JVM options and check whether it helps or not?

@wallysoncarvalho same here ! ;-)
I re-switched to WSL2 yesterday because I didn't use testportainer for the rest of the day.
And this morning I ran the tests using testportainer,  it works !!...
Nothing change but it works fine today... weird...

Can somebody try adding -Djava.net.preferIPv4Stack=true to the JVM options and check whether it helps or not?

Man... some kind of voodoo. Same @fb33 and @wallysoncarvalho here. I was trying to test your approach, @bsideup. It worked. But then I tried without it and it worked too.
My project was working some weeks before the problem came. It stopped suddenly.
If I could bet... Windows Updates. There are a lot of Windows Defender updates history amidst the time I was hit by the problem and now. I tested without Windows Firewall, but I did not disabled Defender for the tests in the past days. My bad.... apologies.
But the IPV6 and 4 tests I did It for real setting and unsetting TESTCONTAINERS_HOST_OVERRIDE to check my hypothesis. I tested  the port ranges too. Running myself the containers with the random port ranges, i.e. 49154, and 18080. The latest worked and the earliest did not.
But, for sure, It is not a framework problem at all. I did test by that time on a Linux Virtual Machine and it worked too.

Same here. Thinks mentioned above does not help. It worked great few days ago. I also tried -Djava.net.preferIPv4Stack=true and disabling windows defender without luck.
Thx,
Ivos
I have tested with pgsql container and it looks like that somethink have changed after some win-update.
This does not work
docker ps
CONTAINER ID   IMAGE           COMMAND                  CREATED         STATUS         PORTS                     NAMES
a46a3c46f101   postgres:12.1   "docker-entrypoint.s…"   6 seconds ago   Up 5 seconds   <IP_ADDRESS>:49159->5432/tcp   docker-dev_pgsql-transparent_1

with compose
    ports:
      - 5432

This works correctly
docker ps
CONTAINER ID   IMAGE           COMMAND                  CREATED         STATUS         PORTS                    NAMES
fa981888fa45   postgres:12.1   "docker-entrypoint.s…"   8 seconds ago   Up 6 seconds   <IP_ADDRESS>:5432->5432/tcp   docker-dev_pgsql-transparent_1

with compose
    ports:
      - 5432:5432

when I choose large port range, i got error
    ports:
      - 49159:5432

console
docker-compose up
Found orphan containers (docker-dev_zookeeper_1, docker-dev_kafka_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Recreating docker-dev_pgsql-transparent_1 ...
pgsql-transparent_1  | 2021-01-07 12:38:51.092 UTC [1] LOG:  received smart shutdown request
pgsql-transparent_1  | 2021-01-07 12:38:51.098 UTC [1] LOG:  background worker "logical replication launcher" (PID 33) exited with exit code 1
pgsql-transparent_1  | 2021-01-07 12:38:51.099 UTC [28] LOG:  shutting down
pgsql-transparent_1  | 2021-01-07 12:38:51.133 UTC [1] LOG:  database system is shut down
Recreating docker-dev_pgsql-transparent_1 ... error

ERROR: for docker-dev_pgsql-transparent_1  Cannot start service pgsql-transparent: Ports are not available: listen tcp <IP_ADDRESS>:49159: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

ERROR: for pgsql-transparent  Cannot start service pgsql-transparent: Ports are not available: listen tcp <IP_ADDRESS>:49159: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
Encountered errors while bringing up the project.

docker compose file
version: '3'
services:
  pgsql-transparent:
    image: "postgres:12.1"
    env_file:
      - database.env
    ports:
      - 5432:5432
volumes:
  database-data: # named volumes can be managed easier using docker-compose

my docker is
docker version
Client: Docker Engine - Community
 Cloud integration: 1.0.4
 Version:           20.10.2
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        2291f61
 Built:             Mon Dec 28 16:14:16 2020
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.2
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       8891c58
  Built:            Mon Dec 28 16:15:23 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Same here. Thinks mentioned above does not help. It worked great few days ago. I also tried -Djava.net.preferIPv4Stack=true and disabling windows defender without luck.
Thx,
Ivos
I have tested with pgsql container and it looks like that somethink have changed after some win-update.
This does not work
docker ps
CONTAINER ID   IMAGE           COMMAND                  CREATED         STATUS         PORTS                     NAMES
a46a3c46f101   postgres:12.1   "docker-entrypoint.s…"   6 seconds ago   Up 5 seconds   <IP_ADDRESS>:49159->5432/tcp   docker-dev_pgsql-transparent_1

with compose
    ports:
      - 5432

This works correctly
docker ps
CONTAINER ID   IMAGE           COMMAND                  CREATED         STATUS         PORTS                    NAMES
fa981888fa45   postgres:12.1   "docker-entrypoint.s…"   8 seconds ago   Up 6 seconds   <IP_ADDRESS>:5432->5432/tcp   docker-dev_pgsql-transparent_1

with compose
    ports:
      - 5432:5432

when I choose large port range, i got error
    ports:
      - 49159:5432

console
docker-compose up
Found orphan containers (docker-dev_zookeeper_1, docker-dev_kafka_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Recreating docker-dev_pgsql-transparent_1 ...
pgsql-transparent_1  | 2021-01-07 12:38:51.092 UTC [1] LOG:  received smart shutdown request
pgsql-transparent_1  | 2021-01-07 12:38:51.098 UTC [1] LOG:  background worker "logical replication launcher" (PID 33) exited with exit code 1
pgsql-transparent_1  | 2021-01-07 12:38:51.099 UTC [28] LOG:  shutting down
pgsql-transparent_1  | 2021-01-07 12:38:51.133 UTC [1] LOG:  database system is shut down
Recreating docker-dev_pgsql-transparent_1 ... error

ERROR: for docker-dev_pgsql-transparent_1  Cannot start service pgsql-transparent: Ports are not available: listen tcp <IP_ADDRESS>:49159: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

ERROR: for pgsql-transparent  Cannot start service pgsql-transparent: Ports are not available: listen tcp <IP_ADDRESS>:49159: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
Encountered errors while bringing up the project.

docker compose file
version: '3'
services:
  pgsql-transparent:
    image: "postgres:12.1"
    env_file:
      - database.env
    ports:
      - 5432:5432
volumes:
  database-data: # named volumes can be managed easier using docker-compose

my docker is
docker version
Client: Docker Engine - Community
 Cloud integration: 1.0.4
 Version:           20.10.2
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        2291f61
 Built:             Mon Dec 28 16:14:16 2020
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.2
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       8891c58
  Built:            Mon Dec 28 16:15:23 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Thanks bedla that worked great for me!  Scary seeing all the network interfaces deleted but luckily it left my TAP adapters alone :)

Thanks bedla that worked great for me!  Scary seeing all the network interfaces deleted but luckily it left my TAP adapters alone :)

I have the same problem with Docker Desktop 3.x on Windows 10 20H2 with WSL2.
I noticed that I always must start Docker containers with explicitly exposed ports, e.g., docker run -p 8080:8080....
Although it is not recommended, I tried to run my test container with fixed port-binding and deactivated Ryuk container - and it works:
In file testcontainer.properties:
ryuk.container.privileged = false
Environment variable:
TESTCONTAINERS_RYUK_DISABLED=true
In java test code (here Elasticsearch):
Consumer<CreateContainerCmd> cmd = e -> e.withPortBindings(new PortBinding(Ports.Binding.bindPort(9200), new ExposedPort(9200)));
elasticsearch = new ElasticsearchContainer(
	DockerImageName
		.parse(ELASTICSEARCH_CONTAINER_PROXY)
		asCompatibleSubstituteFor(ELASTICSEARCH_CONTAINER)
	).withExposedPorts(9200).withCreateContainerCmdModifier(cmd);

elasticsearch.start();

I suppose that this also may work with dynamic ports. Maybe you could solve this problem in the code by adding an option to use explicitly exposed (random) ports when starting the containers (and for the Ryuk container too)?

I have the same problem with Docker Desktop 3.x on Windows 10 20H2 with WSL2.
I noticed that I always must start Docker containers with explicitly exposed ports, e.g., docker run -p 8080:8080....
Although it is not recommended, I tried to run my test container with fixed port-binding and deactivated Ryuk container - and it works:
In file testcontainer.properties:
ryuk.container.privileged = false
Environment variable:
TESTCONTAINERS_RYUK_DISABLED=true
In java test code (here Elasticsearch):
Consumer<CreateContainerCmd> cmd = e -> e.withPortBindings(new PortBinding(Ports.Binding.bindPort(9200), new ExposedPort(9200)));
elasticsearch = new ElasticsearchContainer(
	DockerImageName
		.parse(ELASTICSEARCH_CONTAINER_PROXY)
		asCompatibleSubstituteFor(ELASTICSEARCH_CONTAINER)
	).withExposedPorts(9200).withCreateContainerCmdModifier(cmd);

elasticsearch.start();

I suppose that this also may work with dynamic ports. Maybe you could solve this problem in the code by adding an option to use explicitly exposed (random) ports when starting the containers (and for the Ryuk container too)?

As for me, a restarted my Docker Desktop, and the issue has gone.

As for me, a restarted my Docker Desktop, and the issue has gone.

Yes, it works. But restarting docker several times a day isn't optimal solution.

@0Prime please consider reporting to the Docker project as it seems to be something with Docker.
As it seems to be related to https://github.com/docker/for-win/issues/3171 (as @bedla pointed out), I will close this issue since there isn't something we can do about it.

The workaround to disable WSL2 worked for me too.

Clean up with docker system prune helps me

@vdergachev this might reset the counter for Docker's --publish-all behavior. See https://github.com/docker/for-win/issues/11584 for likely upstream reason.

For me - restarting Windows helped

i just restart docker daemon via
systemctl restart docker

@pilot911 If you are using systemd to manage Docker, this should be completely unrelated to this issue about Docker for Windows.

A simple Docker restart in Windows fixed this issue for me.

on Windows, right click Docker Desktop icon > Restart Docker...

Had the same issue with colima on Mac M1, stopping and starting it again fixed the issue.

I use Docker on Windows and the following solution worked for me

open you PowerShell in administrator mode.

run net stop winnat

run net start winnat
https://stackoverflow.com/questions/67401489/java-lang-illegalstateexception-could-not-connect-to-ryuk-at-localhost49167

For me, it's some library update (from Ubuntu packages) which keeps disabling the port forwarding in iptables.
See my gist for how to solve:
https://gist.github.com/OndraZizka/7f648b37dc68eb2157cd7b5390ea934e

On linux, just restart docker engine:
sudo systemctl restart docker.service
;) Enjoy