Node creation in infinite loop

Version

Karpenter: v0.10.1

Kubernetes: v1.21.12-eks-a64ea69
Expected Behavior
Create a new node to provide capacity, if that is unlucky stop the loop
Actual Behavior
In 12h Karpenter scheduled 235 nodes for the very same pod. Because of missing defragmentation the problem cascades to even spread the cluster eventually in 33 of unnecessary nodes.
Problem is that the pod request ephemeral-storage did not actually fit into the node, which is probably a miscalculation,  was therefore pending to start and Karpenter ran into a loop of continuously creating new nodes with the same not matching storage.
Steps to Reproduce the Problem

create node provisioner

  provider:
    blockDeviceMappings:
      - deviceName: /dev/xvda
        ebs:
          encrypted: true
          volumeSize: 100Gi
          volumeType: gp3

create a pod with

│     resources:
│       requests:
│         ephemeral-storage: 100Gi

The resulting node has only 98.49Gi, not the expected 100Gi
Capacity:
  ephemeral-storage:           113233900Ki
Allocatable:
  ephemeral-storage:<PHONE_NUMBER>44

Resource Specs and Logs
Batched 1 pod(s) in 1.000501513s
1 pod(s) will schedule against new capacity, 0 pod(s) against existing capacity
Launched instance: i-0a3a0aad7547c6972, hostname: ip-172-16-13-98.ec2.internal, type: c5.xlarge, zone: us-east-1b, capacityType: spot
Created node with 1 pods requesting {"cpu":"2470m","ephemeral-storage":"100Gi","memory":"4566Mi","pods":"9"} from types c4.xlarge, c6a.xlarge, c5.xlarge, c6i.xlarge, c5a.xlarge and 352 other(s)
Webhook ServeHTTP request=&http.Request{Method:"POST", URL:(*url.URL)(0xc000ceaab0), Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{"Accept":[]string{"application/json, */*"}, "Accept-Encoding":[]string{"gzip"}, "Content-Length":[]string{"7932"}, "Content-Type":[]string{"application/json"}, "User-Agent":[]string{"kube-apiserver-admission"}}, Body:(*http.body)(0xc00064c940), GetBody:(func() (io.ReadCloser, error))(nil), ContentLength:7932, TransferEncoding:[]string(nil), Close:false, Host:"karpenter.karpenter.svc:443", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:"<IP_ADDRESS>:48740", RequestURI:"/default-resource?timeout=10s", TLS:(*tls.ConnectionState)(0xc0004fc210), Cancel:(<-chan struct {})(nil), Response:(*http.Response)(nil), ctx:(*context.cancelCtx)(0xc00064c980)}
Kind: "karpenter.sh/v1alpha5, Kind=Provisioner" PatchBytes: null
remote admission controller audit annotations=map[string]string(nil)
Webhook ServeHTTP request=&http.Request{Method:"POST", URL:(*url.URL)(0xc000ceb290), Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{"Accept":[]string{"application/json, */*"}, "Accept-Encoding":[]string{"gzip"}, "Content-Length":[]string{"7932"}, "Content-Type":[]string{"application/json"}, "User-Agent":[]string{"kube-apiserver-admission"}}, Body:(*http.body)(0xc00064de40), GetBody:(func() (io.ReadCloser, error))(nil), ContentLength:7932, TransferEncoding:[]string(nil), Close:false, Host:"karpenter.karpenter.svc:443", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:"<IP_ADDRESS>:48742", RequestURI:"/validate-resource?timeout=10s", TLS:(*tls.ConnectionState)(0xc0004fc630), Cancel:(<-chan struct {})(nil), Response:(*http.Response)(nil), ctx:(*context.cancelCtx)(0xc00064de80)}
remote admission controller audit annotations=map[string]string(nil)
Waiting for unschedulable pods
Bound persistent volume claim to node ip-172-16-13-98.ec2.internal
Webhook ServeHTTP request=&http.Request{Method:"POST", URL:(*url.URL)(0xc000811680), Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{"Accept":[]string{"application/json, */*"}, "Accept-Encoding":[]string{"gzip"}, "Content-Length":[]string{"7932"}, "Content-Type":[]string{"application/json"}, "User-Agent":[]string{"kube-apiserver-admission"}}, Body:(*http.body)(0xc000b78140), GetBody:(func() (io.ReadCloser, error))(nil), ContentLength:7932, TransferEncoding:[]string(nil), Close:false, Host:"karpenter.karpenter.svc:443", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:"<IP_ADDRESS>:48740", RequestURI:"/default-resource?timeout=10s", TLS:(*tls.ConnectionState)(0xc0004fc210), Cancel:(<-chan struct {})(nil), Response:(*http.Response)(nil), ctx:(*context.cancelCtx)(0xc000b78180)}
Kind: "karpenter.sh/v1alpha5, Kind=Provisioner" PatchBytes: null
remote admission controller audit annotations=map[string]string(nil)
Webhook ServeHTTP request=&http.Request{Method:"POST", URL:(*url.URL)(0xc000811e60), Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{"Accept":[]string{"application/json, */*"}, "Accept-Encoding":[]string{"gzip"}, "Content-Length":[]string{"7932"}, "Content-Type":[]string{"application/json"}, "User-Agent":[]string{"kube-apiserver-admission"}}, Body:(*http.body)(0xc000b79300), GetBody:(func() (io.ReadCloser, error))(nil), ContentLength:7932, TransferEncoding:[]string(nil), Close:false, Host:"karpenter.karpenter.svc:443", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:"<IP_ADDRESS>:48742", RequestURI:"/validate-resource?timeout=10s", TLS:(*tls.ConnectionState)(0xc0004fc630), Cancel:(<-chan struct {})(nil), Response:(*http.Response)(nil), ctx:(*context.cancelCtx)(0xc000b79340)}
remote admission controller audit annotations=map[string]string(nil)
Batched 1 pod(s) in 1.000492692s
1 pod(s) will schedule against new capacity, 0 pod(s) against existing capacity
Launched instance: i-037f438e498e68aca, hostname: ip-172-16-20-139.ec2.internal, type: c5a.xlarge, zone: us-east-1c, capacityType: spot
Created node with 1 pods requesting {"cpu":"2470m","ephemeral-storage":"100Gi","memory":"4566Mi","pods":"9"} from types c4.xlarge, c5a.xlarge, c6a.xlarge, c6i.xlarge, c5.xlarge and 352 other(s)
Webhook ServeHTTP request=&http.Request{Method:"POST", URL:(*url.URL)(0xc000b70480), Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{"Accept":[]string{"application/json, */*"}, "Accept-Encoding":[]string{"gzip"}, "Content-Length":[]string{"7932"}, "Content-Type":[]string{"application/json"}, "User-Agent":[]string{"kube-apiserver-admission"}}, Body:(*http.body)(0xc000b511c0), GetBody:(func() (io.ReadCloser, error))(nil), ContentLength:7932, TransferEncoding:[]string(nil), Close:false, Host:"karpenter.karpenter.svc:443", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:"<IP_ADDRESS>:48740", RequestURI:"/default-resource?timeout=10s", TLS:(*tls.ConnectionState)(0xc0004fc210), Cancel:(<-chan struct {})(nil), Response:(*http.Response)(nil), ctx:(*context.cancelCtx)(0xc000b51200)}
Kind: "karpenter.sh/v1alpha5, Kind=Provisioner" PatchBytes: null
remote admission controller audit annotations=map[string]string(nil)
Webhook ServeHTTP request=&http.Request{Method:"POST", URL:(*url.URL)(0xc000b70c60), Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{"Accept":[]string{"application/json, */*"}, "Accept-Encoding":[]string{"gzip"}, "Content-Length":[]string{"7932"}, "Content-Type":[]string{"application/json"}, "User-Agent":[]string{"kube-apiserver-admission"}}, Body:(*http.body)(0xc000bc6380), GetBody:(func() (io.ReadCloser, error))(nil), ContentLength:7932, TransferEncoding:[]string(nil), Close:false, Host:"karpenter.karpenter.svc:443", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:"<IP_ADDRESS>:48742", RequestURI:"/validate-resource?timeout=10s", TLS:(*tls.ConnectionState)(0xc0004fc630), Cancel:(<-chan struct {})(nil), Response:(*http.Response)(nil), ctx:(*context.cancelCtx)(0xc000bc63c0)}
Waiting for unschedulable pods
remote admission controller audit annotations=map[string]string(nil)
Bound persistent volume claim to node ip-172-16-20-139.ec2.internal
Added TTL to empty node
Batched 1 pod(s) in 1.00071552s

Hello @universam1 ,
Often the difference between Capacity and Allocatable resources is due to kube-reserved or system-reserved values being passed to Kubelet.  For example, with the EKS optimized AL2 image, 1Gi of ephemeral-storage is reserved which causes the Allocatable ephemeral-storage to report 1GB less than the actual available disk size.
I believe the issue you encountered is actually due to a problem with how Karpenter used to handle bin-packing of pods that have ephemeral-storage requests defined.  We merged a fix for this problem in https://github.com/aws/karpenter/pull/1859, which will be included in the next release.  Before this fix, it was certainly possible for nodes to be launched which could not satisfy the ephemeral-storage requirements of a given pod.

To take this a bit further, with #1859 the pod would remain in a pending state without any new nodes being launched, given no instance types would be able to satisfy the pod's ephemeral-storage requests.
With #1859 we take out (5GB) of storage from the actual disk size when bin-packing pods to nodes to account for "system" services, etc.  So in your case, if a pod requires 100GB of ephemeral storage, then you would want to set the block device to a minimum of 105GB.

Thank you @dewjam for the insights and explanations - and as I can see working out a solution already!
The storage head room sounds like a practical solution, which is what I do manually now, given that without this checks as of now it can happen any time again.
Happy to see that this case is covered and should be fixed with the new release, eagerly awaiting the improvements of this new release!
I can check once the release is rolled out if this issue is closed.

My pleasure!  If you would like to try out the code before official release, we do have a snapshot out there:  https://kubernetes.slack.com/archives/C02SFFZSA2K/p1654563719352349
Obviously, this should not be used for production use-cases

If case you're not part of the Kubernetes Slack org, here's the process to test it out:
export CLUSTER_NAME="<CLUSTER_NAME>"
export COMMIT="06bd4282b6cfd2419b5f6e31340b7d32d00d167e"
export AWS_ACCOUNT_ID="$(aws sts get-caller-identity --query Account --output text)"
export KARPENTER_IAM_ROLE_ARN="arn:aws:iam::${AWS_ACCOUNT_ID}:role/${CLUSTER_NAME}-karpenter"
export CLUSTER_ENDPOINT="$(aws eks describe-cluster --name ${CLUSTER_NAME} --query "cluster.endpoint" --output text)"

helm install karpenter oci://public.ecr.aws/karpenter-snapshots/karpenter --version v0-${COMMIT} --namespace karpenter \
  --set serviceAccount.annotations."eks\.amazonaws\.com/role-arn"=${KARPENTER_IAM_ROLE_ARN} \
  --set clusterName=${CLUSTER_NAME} \
  --set clusterEndpoint=${CLUSTER_ENDPOINT} \
  --set aws.defaultInstanceProfile=KarpenterNodeInstanceProfile-${CLUSTER_NAME} \
  --wait # for the defaulting webhook to install before creating a Provisioner

Hello @universam1 ,
I'm going to go ahead and close this out, but please feel free to reopen if you find the issue is not resolved.
Thanks!


Incorrect yaml file

Problem encountered on https://dotnet.microsoft.com/en-us/learn/aspnet/deploy-microservice-tutorial/deploy
Operating System: linux
Hello. The yaml file provided on the kubernet deployment section is not correct and can't be used in this format

Hello! Please confirm that the YAML file contents that you saved match what is available in the tutorial, including all leading whitespace. It's likely that some of the indentation was lost in your local copy of the file.


Error measures

We need to fill in the functions for error measures: RMSE, final time, etc..
The functions are there (with a tentative interface -- open for discussion), but need content :)

Solved in #15


Link to azure app setup from email channel

@thgh Thanks for the PR, made a fix to the Markdown and did a minor rewrite to make it clear. I will get this merged once the build is complete.


Help : Memtable

@danchia  I went through code for memtable . Just have few doubts

is memtable lock free skiplist ?
does memtable only support insert operation ?

@danchia Thanks for quick response . Just beginners doubt . (sorry for more questions)

If memtable is lock free, then what is use mu.Lock as first statement in  Insert function.
Here
Would not this lock entire method and insertion will become sequential for that memtable ?

Good questions - it's actually only lock-free on reading, not insertion.
For very write-heavy workloads this may pose a problem, but I'm waiting for that to happen before worrying :)

Cool. Looking forward to lock free implementation for write heavy workloads .  (also more tutorials on ddb :-) )


issue to make text on badge

Hello, when i try this instruction as i see on the readme :
self.badge!.addOrReplaceCurrent(with text: "5", animated: true)
produces an error -> "Expected ',' separator" :
And when i try to fix it so no error is showed with this line :
self.badge!.addOrReplaceCurrent(with : "5", animated: true)
I don't see any text on the badge

Hello!
First of all thanks for pointing out the mistake in documentation, I'll fix that. Your second problem - I have no idea what does it not work for you. Please check the example project that is provided with this library - everything works fine there.

Thanks for reply, my code is juste the same as the documentation with one exception, i'm working on top of UIButton, and on the project you're using UIImageView, u think the library is compatible with UIButton ?

I don't see a reason why it should not work with UIButton - I tried replacing the UIImageView with UIButton in the sample project and everything works fine.


SMA pv_power sensor has "unknown" as a state

Home Assistant release with the issue:

0.97.2
Last working Home Assistant release (if known):
none
Operating environment (Hass.io/Docker/Windows/etc.):

Hass.io on a Virtualbox VM
Component/platform:

https://www.home-assistant.io/components/sma/
Description of problem:
When my SMA converter doesn't generate any power, the pv_power sensor shows "unknown" as a state, instead of 0 (zero). This causes eg. the lovelace gauge component to fail.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

Traceback (if applicable):

Additional information:
I would like to see a "0" instead of "unknown" when my SMA converter doesn't produce any power. This will make many things inside HA more convenient.

Is unknown always zero?

I'm not sure what happens with a connection loss. My SMA converter has a steady wifi connection, so I'm only encountering "unknown" during the late evening and night, when it doesn't produce any power.

I also get unknown at night, was just wondering if this comes from the inverter in some way... likely
Will have a look

You can use the following template sensor to always get a number for now:
sensor:
  - platform: template
    sensors:
      grid_power2:
        friendly_name: "grid power"
        unit_of_measurement: 'W'
        value_template: "{{ state('sensor.grid_power') | int }}"

Great, thank you. That will do for now.
@kellerza BTW, a little offtopic, but not worth to get its own new issue I think: What does the SMA sensor do after the wifi connection was lost to the converter? My parents have a SMA converter too, which seems to be losing connection once in a while. The sensor suddenly stops working every few days. We need to restart Home Assistant to fix that.

Hopefully #26075 fixes that

Great!
A little correction on your template:

You can use the following template sensor to always get a number for now:
sensor:
  - platform: template
    sensors:
      grid_power2:
        friendly_name: "grid power"
        unit_of_measurement: 'W'
        value_template: "{{ state**s**('sensor.grid_power') | int }}"

"state" must be "states".

I also see this behaviour in HA and I run version: 0.99.2

@kellerza, @roybosch I have a SMA inverter and am attempting to trial the sma sensor integration. Its not working for me nor for another HA newbee. We're both using v1.03.6. I note there is a recent upgrade to [pysma](https://github.com/kellerza/pysma/blob/master/pysma/__init__.py#L100). Is this update partially a fix for the transition to v0.1xx.x and above, and if so could you point me to where I place the updated python code in hass.o?

@dweston please open a new issue with the configuration you have tried.
This issue (unkown state) is expected when:

The sensor does not exists on your inverter
It refers to some value (i.e. power) that only works during daylight hours and otherwise reports unknown.

If you know you have the correct sensor value you can force it to an int using the template example above, but that will hide both 1 and 2


Update to latest OASIS errata level

Description
This brings DITA-OT up to date with the latest grammar files in the DITA TC's repository.
The comments in headers are marked as Errata 01; the files also include all items approved for Errata 02. The Errata 02 period has now ended so these should be final for that version. The headers will be updated to 02 later when there is a working download link set for the grammar files.
Motivation and Context
Keep up with the latest version of the standard; this also resolves #2725 and #2818.
How Has This Been Tested?
Integration and unit tests.
Type of Changes

Incorporate external bug fixes

Checklist
X I have signed-off my commits per http://www.dita-ot.org/DCO.
X Builds & tests completed successfully (./gradlew test integrationTest).
X My code follows the code style of this project.
-  https://github.com/dita-ot/dita-ot/wiki/Java-Coding-Conventions
-  https://github.com/dita-ot/dita-ot/wiki/XSLT-Coding-Conventions

Leaving this open until we're closer to 3.0.2 release, in case OASIS updates the grammar files with proper headers for Errata 02.

Will there be any 2.x release also? Because these changes would probably also be worth integrating in it.

Yes - that's true. I still think it's likely we'll have another 2.5.x hotfix but my focus right now has been on testing 3.0 so that I can upgrade. I think once we start putting together the next 2.5.x hotfix I'll try to port this and at least a few relevant 3.0 fixes back into that patch (always assuming I have the time, of course...)


Move to promises and not use dismissListener as it causes aborts

Just wanted to share the code to move to promises instead of callbacks as discussed in #92
It contains some other changes also that are specific to my use case such as removing the dismissListener as it has been causing aborts in my app. I don't expect for the PR to merged. Just wanted to share the code for moving to promises. Please feel free to close the PR.

Hey @varungupta85 thanks for being so persistant here. I haven't got a chance yet to dive into this. Are you sure getting rid of dismissListener is the way to go? How can we detect dismiss now?

Personally I don't think that removing dismissListener is the way to go.

I also think removing dismissListener isn't right approach. It seems like a simple race condition we can fix. I don't even think we have to move to promise based. Just a correct small edit is needed I think.

One other way of fixing the problem could be to pass the onDismiss handler separately to the java code such that even if both the action handler and the onDismiss handlers are called, they are separate callbacks and hence won't run into the multiple callback invocation problem.

@varungupta85 I like that idea. I'll do some testing.

I can modify the PR as per above idea to pass two callbacks instead of one if you guys are okay with it.

@Noitidart I will update the PR as soon as I get time to work on it.
I was not able to test the branch you mentioned since it still contains the mCallbackConsumed flag which masks the problem. I couldn't reproduce the abort on my setup/phones even earlier.

Thanks @varungupta85 for your effort here! I'm real busy so i appreicate your help! I will be out all day today but will follow up to see your work.

@Noitidart As I mentioned in the PR, I only submitted the PR to share what would be involved in using Promises in the native side also as that is a cleaner API. This PR contains changes that were specific to my requirements. So, I don't expect the PR to be merged but it can start off with someone interested in using Promises on the native side also.

I really appreciate that @varungupta85 - I would love to move to a promise based API on the native side. I actually am learning the native development by working on this.

Thanks Varun for being so consistent with this. I haven't merged yet because I don't totally understand the code, to see if it has any reprecussions. I'll have to sit down with the code soon. Or if anyone else is more familiar, would be awesome to get an analysis.

Does anyone understand the implications of this and can review this PR?


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-archive-test-target/pull/498 is merged into live branch.
Auto archive content to https://github.com/VSC-Service-Account/docs-archive-test-target.git

Docs Build status updates of commit c486c84:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error-GitBranchDeletedOrForcePushed]

Cannot sync git repo to specified commit because branch Release_Archive_master_2020-05-31-05-13-38 has been deleted or has been force pushed: fatal: couldn't find remote ref refs/heads/Release_Archive_master_2020-05-31-05-13-38

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


bug(mat-dialog): Tab content jumps a little right after dialog opening.

Reproduction

Here are the two adjacent frames extracted from the gif above, there you can see that alignment of elements is slightly different (if you don't see - I recommend to use page ruler to make sure I don't lie).

Use StackBlitz to reproduce your issue:

https://stackblitz.com/edit/angular-hwqwcc?file=src/app/dialog-overview-example-dialog.scss

Steps to reproduce:

Open the given link and open/close dialog at least a few times.
If cannot reproduce the bug - enable max cpu throttling in devtools.

Option 2:

Open the angular material documentation: https://material.angular.io/components/dialog/overview
Open/close first dialog at least a few times.
If cannot reproduce the bug - enable max cpu throttling in devtools.

Expected Behavior
Dialog content shouldn't move after dialog opens with that beautiful 'grow' style animation.
Actual Behavior
The dialog content is jumping a little (depends on what content it has). I'm afraid that the issue https://github.com/angular/components/issues/13870 also might be related to this bug. So it's the dialog's fault that expansion panel is expanded and content is jumping.
Environment

Browser(s): Chrome (Version 89.0.4389.90 (Official Build) (64-bit))
Operating System (e.g. Windows, macOS, Ubuntu): Windows 10 latest version

I don't see any jumping on my end. Are you referring to the bluriness between the first and second screenshot?

@crisbeto, Hi, thanks for checking! Not really, blurriness is an animation which is perfectly fine. In gif above you should focus on watching the text inputs (how they jump a little up after dialog init). Looks like it's just around 1 or 2px, but when almost all elements move it's noticeable (at least for me). Here are two adjacent frames and I used ruler to try to show that inputs slightly are in different positions.

Thanks for the screenshot, but I still can't notice it on my machine. It looks like some kind of artifact from the animation so I'm not sure whether we can do much about it.

It was more noticeable on my old laptop, it works very slow, that's when I noticed the jumping. Now I'm using high-end laptop and it unnoticeable without enabling hard throttling. So, I'm not sure, if nobody except me has issues with this, probably this issue should be closed. What do you think?

Closing since it seems to not be an issue any more


project_name label

I would like to have project_name label added to all export so Its easy to filter based on openstack project name based resource usage. How do I add project_name label in each libvirt scarp?

@satishdotpatel you simply join with the
libvirt_domain_openstack_info metric which holds all kinds of OpenStack related labels


Core/TypedProgram.swift:118: Fatal error: Unexpectedly found nil while unwrapping an Optional value

Compile this:
public trait Equatable {

  fun infix== (_ other: Self) -> Bool

}

extension Equatable {
  public fun infix!=  (_ other: Self) -> Bool { !(self == other) }
}

@kyouko-taiga Seems to work; I think we can close this?

Oh wow. I didn't expect monomorphization would be able to pick up definitions in extensions. We can close if we have a test that runs this code.

Would this be ok as a suitable end-to-end test? If so, what would be a good filename to describe this test?
I've checked it compiles and runs.
//- compileAndRun expecting: success

public trait Equatable {

  fun infix== (_ other: Self) -> Bool

}

extension Equatable {
  public fun infix!= (_ other: Self) -> Bool { !(self == other) }
}

type A: Deinitializable, Equatable {
  public let x: Int
  public memberwise init
  fun infix== (_ other: Self) -> Bool { self.x == other.x }
}

public fun main() {
  let a = A(x: 1)
  let b = A(x: 1)
  let c = A(x: 2)
  precondition(a == b)
  precondition(a != c)
  precondition(b != c)
}


Can't find VS Code in Start Menu

Issue Type: Bug
Can you please share where the .exe file is so I can manually add it to the Start Menu
VS Code version: Code 1.42.1 (c47d83b293181d9be64f27ff093689e8e7aed054, 2020-02-11T14:45:59.656Z)
OS version: Windows_NT x64 10.0.17763
Extensions: none

C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\Code.exe is the user install location


Not on top of TopMost windows

I have a GUI with a switch to toggle if it's always on top or not, but it's in a tight space so I can't have the full "Always on Top" label and shortened it to AoT. I wanted a tooltip to tell people what that meant, but when the switch is on, the tooltip is behind the GUI. It looks great when it's off so the tooltip is on top, though.
edit: adding this on line 33 solves it for your example, but not when importing as a module:
tw.attributes('-topmost', True)

Can you provide me a minimal example of your code explaining it? This say I can re produce and try to help out.
This is just a modification of the built in tool tip in tkinter, so we'll have to see what we can do.

I actually copied your module into MS VS Code and added
root.attrubutes(topmost,"true") to make it always on too to reproduce the
issue and verify it wasnt something with my code. Im using the
customtkinter module for the layout, so i wanted to rule that out. Then I
added the same attribute for the tool tip window on line 33 of your code to
solve it.
On Fri, Aug 18, 2023, 11:53 PM Jessie Wilson @.***>
wrote:

Can you provide me a minimal example of your code explaining it? This say
I can re produce and try to help out.
This is just a modification of the built in tool tip in tkinter, so we'll
have to see what we can do.
—
Reply to this email directly, view it on GitHub
https://github.com/jlw4049/Custom-Tkinter-Tooltip/issues/1#issuecomment-1684885057,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AXDHU75MSK3T5ML4N7GXGJTXWBWFZANCNFSM6AAAAAA3WDEYBE
.
You are receiving this because you authored the thread.Message ID:
@.***>

Did you test this throughly? If so you can do a PR.

I'm not a trained programmer, only a hobbyist, and never use GitHub for
anything other than copy+pasting stuff so I had to figure out the forking
and pulling, but I think I got it. I copied your code into MS VS Code and
set the main gui to topmost true to verify the issue, then I set the
tooltip window to topmost as well to verify the fix. I hope that counts as
testing it thoroughly.
On Sun, Aug 20, 2023 at 8:28 AM Jessie Wilson @.***>
wrote:

Did you test this throughly? If so you can do a PR.
—
Reply to this email directly, view it on GitHub
https://github.com/jlw4049/Custom-Tkinter-Tooltip/issues/1#issuecomment-1685324548,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AXDHU7ZTNTRURJSJ7PVNBSTXWI3LLANCNFSM6AAAAAA3WDEYBE
.
You are receiving this because you authored the thread.Message ID:
@.***>

I'm not a trained programmer, only a hobbyist, and never use GitHub for anything other than copy+pasting stuff so I had to figure out the forking and pulling, but I think I got it. I copied your code into MS VS Code and set the main gui to topmost true to verify the issue, then I set the tooltip window to topmost as well to verify the fix. I hope that counts as testing it thoroughly.
…
On Sun, Aug 20, 2023 at 8:28 AM Jessie Wilson @.> wrote: Did you test this throughly? If so you can do a PR. — Reply to this email directly, view it on GitHub <#1 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXDHU7ZTNTRURJSJ7PVNBSTXWI3LLANCNFSM6AAAAAA3WDEYBE . You are receiving this because you authored the thread.Message ID: @.>

I responded to you on the PR. I wasn't a "trained" programmer when I started either, I just started as a hobby with eagerness to learn. Nothing wrong with that!


nCS asserted for unusually long prior to SERRIF

Using ESP32 with two MCP2517FD on one SPI bus, I seem to be observing a SPI contention problem.  With both MCP2517 enabled, sharing a bus, with a third device injecting frames, the system reaches a state in which SERRIF is set on one of the drivers, indicating that the driver has transitioned to "restricted operation mode" (DS20005678B-page 9).  This mode is reached more quickly when the bus is under heavy load.
To narrow this issue down, I disabled all but one of the MCP2517FD devices.  There are no other devices on the SPI bus, apart from the ESP32.
A logic analyzer shows that the problem is correlated with the ESP taking an unusually long time to deassert nCS on one of the MCP2517 devices, indicating that one RTOS task may have preempted another.

I added a function to retrieve SERRIF, and called it from a 10ms task:
void check_serrif(void *)
{
    Serial.println("SERRIF checker init");
    for (int i = 0; i < 10; i ++)
    {
        digitalWrite(12, HIGH);
        vTaskDelay(100 / portTICK_PERIOD_MS);
        digitalWrite(12, LOW);
        vTaskDelay(100 / portTICK_PERIOD_MS);
    }
    Serial.println("SERRIF checker trigger pending, checking every 10ms");

    static int has_printed;
    while (1)
    {
        if (canfi_board.CAN1_serrif_is_set())
        {
            digitalWrite(12, HIGH);
            if (!has_printed)
                Serial.println("SERRIF'd");
            else
                has_printed = 1;
        }
        vTaskDelay(10 / portTICK_PERIOD_MS);
    }
}

This seems to be a heisenbug.  When I added a warning inside isr_core, the problem becomes unreproduceable.  (It usually triggers in a few seconds otherwise)
I'll have a closer look at how semaphores are handled, but am posting to describe what I've found in the mean-time.

Hello,
Thank you very much for your detailed report. I have read it and check my code, I have two suggestions.
First I use xSemaphoreGive in interrupt service routine ; the RTOS documentation says that xSemaphoreGiveFromISR should be used.
So, instead of
#ifdef ARDUINO_ARCH_ESP32
void ACAN2517::isr (void) {
xSemaphoreGive (mISRSemaphore) ;
}
#endif
write :
#ifdef ARDUINO_ARCH_ESP32
void ACAN2517FD::isr (void) {
BaseType_t xHigherPriorityTaskWoken = pdFALSE ;
xSemaphoreGiveFromISR (mISRSemaphore, &xHigherPriorityTaskWoken) ;
portYIELD_FROM_ISR () ;
}
#endif
But I am not sure this solves your problem.
The second suggestion is to disable interrupts within every beginTransaction / endTransaction block. For example:
mSPI.beginTransaction (mSPISettings) ;
. . . some stuff . . .
mSPI.endTransaction () ;
becomes:
mSPI.beginTransaction (mSPISettings) ;
#ifdef ARDUINO_ARCH_ESP32
taskDISABLE_INTERRUPTS () ;
#endif
. . . some stuff . . .
#ifdef ARDUINO_ARCH_ESP32
taskENABLE_INTERRUPTS () ;
#endif
mSPI.endTransaction () ;
And CS should be asserted within the disable / enable interrupt block:
mSPI.beginTransaction (mSPISettings) ;
#ifdef ARDUINO_ARCH_ESP32
taskDISABLE_INTERRUPTS () ;
#endif
assertCS ()
. . . some stuff . . .
deassertCS () ;
#ifdef ARDUINO_ARCH_ESP32
taskENABLE_INTERRUPTS () ;
#endif
mSPI.endTransaction () ;
Doing so ensures that CS will be deasserted as soon as possible.
I hope this will help you
Best regards,
Pierre Molinaro

Le 27 mai 2019 à 09:10, Nick Kirkby<EMAIL_ADDRESS>a écrit :
Using ESP32 with two MCP2517FD on one SPI bus, I seem to be observing a SPI contention problem. With both MCP2517 enabled, sharing a bus, with a third device injecting frames, the system reaches a state in which SERRIF is set on one of the drivers, indicating that the driver has transitioned to "restricted operation mode" (DS20005678B-page 9). This mode is reached more quickly when the bus is under heavy load.
To narrow this issue down, I disabled all but one of the MCP2517FD devices. There are no other devices on the SPI bus, apart from the ESP32.
A logic analyzer shows that the problem is correlated with the ESP taking an unusually long time to deassert nCS on one of the MCP2517 devices, indicating that one RTOS task may have preempted another.
https://user-images.githubusercontent.com/20824939/58401080-bb7f6b00-8011-11e9-8011-127903d84c2a.png
I added a function to retrieve SERRIF https://github.com/pierremolinaro/acan2517/compare/master...nkirkby:concurrent_access_investigation?expand=1#diff-cd9bc0c0bbd45475fb25b66825a05a2eR1066, and called it from a 10ms task:
void check_serrif(void *)
{
Serial.println("SERRIF checker init");
for (int i = 0; i < 10; i ++)
{
digitalWrite(12, HIGH);
vTaskDelay(100 / portTICK_PERIOD_MS);
digitalWrite(12, LOW);
vTaskDelay(100 / portTICK_PERIOD_MS);
}
Serial.println("SERRIF checker trigger pending, checking every 10ms");
static int has_printed;
while (1)
{
    if (canfi_board.CAN1_serrif_is_set())
    {
        digitalWrite(12, HIGH);
        if (!has_printed)
            Serial.println("SERRIF'd");
        else
            has_printed = 1;
    }
    vTaskDelay(10 / portTICK_PERIOD_MS);
}

}
This seems to be a heisenbug https://en.wikipedia.org/wiki/Heisenbug. When I added a warning https://github.com/pierremolinaro/acan2517/compare/master...nkirkby:concurrent_access_investigation?expand=1#diff-cd9bc0c0bbd45475fb25b66825a05a2eR714 inside isr_core, the problem becomes unreproduceable. (It usually triggers in a few seconds otherwise)
I'll have a closer look at how semaphores are handled, but am posting to describe what I've found in the mean-time.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/pierremolinaro/acan2517/issues/5?email_source=notifications&email_token=AEWKZVGKEBSYPREACFHBULLPXOCONA5CNFSM4HPZFYYKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GV6T4WA, or mute the thread https://github.com/notifications/unsubscribe-auth/AEWKZVAOA7PMZIP3BMICJADPXOCONANCNFSM4HPZFYYA.

Pierre,
Thanks for providing a detailed response.
I tried selectively adding your suggestions.

xSemaphoreGiveFromISR seems to have no effect.  The problem remains reproduceable, and the signature on the logic analyzer is identical.
adding taskDISABLE_INTERRUPTS() / taskENABLE_INTERRUPTS() to only isr_core seems to have made the problem unreproduceable, however it seems to dump the core a couple times on startup before reaching a steady state -- not desirable behavior.

So, I tried only disabling interrupts on mINT with gpio_intr_disable(...):
bool ACAN2517::isr_core (void) {
  bool handled = false ;
  #ifdef ARDUINO_ARCH_ESP32
    gpio_intr_disable((gpio_num_t)mINT);
  #endif
  mSPI.beginTransaction (mSPISettings) ;
  const uint32_t intReg = readRegisterSPI (C1INT_REGISTER) ; // DS20005688B, page 34
  if ((intReg & (1 << 1)) != 0) { // Receive FIFO interrupt
    receiveInterrupt () ;
    handled = true ;
  }
  if ((intReg & (1 << 0)) != 0) { // Transmit FIFO interrupt
    transmitInterrupt () ;
    handled = true ;
  }
  if ((intReg & (1 << 2)) != 0) { // TBCIF interrupt
    writeByteRegisterSPI (C1INT_REGISTER, 1 << 2) ;
  }
  if ((intReg & (1 << 3)) != 0) { // MODIF interrupt
    writeByteRegisterSPI (C1INT_REGISTER, 1 << 3) ;
  }
  if ((intReg & (1 << 12)) != 0) { // SERRIF interrupt
    writeByteRegisterSPI (C1INT_REGISTER + 1, 1 << 4) ;
  }
  mSPI.endTransaction () ;
  #ifdef ARDUINO_ARCH_ESP32
    gpio_intr_enable((gpio_num_t)mINT);
  #endif
  return handled ;
}

This seems to work as expected.
I'll test with both MCP2517 enabled next.

I found that with two MCP enabled, one would preempt the other, forcing it into "restricted operation mode"
I realized that we must disable interrupts for every MCP2517 on the bus during CS asserts.
This seems to fix the problem.
However, this seems to have introduced another problem.  For some reason, an existing interrupt is not handled when interrupts are reenabled.

I've given up on interrupts for the time being, and am instead polling the devices at 1kHz.  This seems to work well.

Hello,
I think xSemaphoreGiveFromISR should be used when called from ISR, instead of  xSemaphoreGive, even if it seems to have no visible effect: it is conform to RTOS documentation. However, RTOS runs on many processors, may be there is no difference between xSemaphoreGiveFromISR and xSemaphoreGive on ESP32, I don't know.
gpio_intr_disable disables GPIO module interrupt signal, but I think it does not solve your problem: preemption may occurs between tasks, leaving a CS asserted. taskDISABLE_INTERRUPTS disables all maskable interrupts, so the MCP2517FD access sequence cannot be preempted.
I have changed xSemaphoreGive to xSemaphoreGiveFromISR  and added  taskDISABLE_INTERRUPTS / taskENABLE_INTERRUPTS pairs in https://github.com/pierremolinaro/acan2517-dev/blob/master/library-sources/src/ACAN2517.cpp https://github.com/pierremolinaro/acan2517-dev/blob/master/library-sources/src/ACAN2517.cpp.
Best regards,
Pierre

Le 27 mai 2019 à 21:00, Nick Kirkby<EMAIL_ADDRESS>a écrit :
Pierre,
Thanks for providing a detailed response.
I tried selectively adding your suggestions.
xSemaphoreGiveFromISR seems to have no effect. The problem remains reproduceable, and the signature on the logic analyzer is identical.
adding taskDISABLE_INTERRUPTS() / taskENABLE_INTERRUPTS() to only isr_core seems to have made the problem unreproduceable, however it seems to dump the core a couple times on startup before reaching a steady state -- not desirable behavior.
So, I tried only disabling interrupts on mINT with gpio_intr_disable(...):
bool ACAN2517::isr_core (void) {
bool handled = false ;
#ifdef ARDUINO_ARCH_ESP32
gpio_intr_disable((gpio_num_t)mINT);
#endif
mSPI.beginTransaction (mSPISettings) ;
const uint32_t intReg = readRegisterSPI (C1INT_REGISTER) ; // DS20005688B, page 34
if ((intReg & (1 << 1)) != 0) { // Receive FIFO interrupt
receiveInterrupt () ;
handled = true ;
}
if ((intReg & (1 << 0)) != 0) { // Transmit FIFO interrupt
transmitInterrupt () ;
handled = true ;
}
if ((intReg & (1 << 2)) != 0) { // TBCIF interrupt
writeByteRegisterSPI (C1INT_REGISTER, 1 << 2) ;
}
if ((intReg & (1 << 3)) != 0) { // MODIF interrupt
writeByteRegisterSPI (C1INT_REGISTER, 1 << 3) ;
}
if ((intReg & (1 << 12)) != 0) { // SERRIF interrupt
writeByteRegisterSPI (C1INT_REGISTER + 1, 1 << 4) ;
}
mSPI.endTransaction () ;
#ifdef ARDUINO_ARCH_ESP32
gpio_intr_enable((gpio_num_t)mINT);
#endif
return handled ;
}
This seems to work as expected.
I'll test with both MCP2517 enabled next.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/pierremolinaro/acan2517/issues/5?email_source=notifications&email_token=AEWKZVHJFLMYH3JTEH463YTPXQVVVA5CNFSM4HPZFYYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWKLV4Y#issuecomment-496286451, or mute the thread https://github.com/notifications/unsubscribe-auth/AEWKZVBEOT4IIG3LOIIFDX3PXQVVVANCNFSM4HPZFYYA.

Neat!  I just tried this, it seems to work well.
Here I have two acan2517 on the same bus, both receiving a CAN message at the same time:

The interrupts are asserted simultaneously, and handled serially without hangups.
A couple of questions:

Why is ACAN2517::available protected with mSPI.beginTransaction()/noInterrupts()?  As far as I can see, it doesn't seem to involve a SPI transaction -- only a query of the driver's receive FIFO.

A question is about memory management for transmitted messages.  ACAN2517::enterInTransmitBuffer takes a reference to a CANMessage.  If mControllerTxFIFOFull (always the case when mControllerTransmitFIFOSize = 0), the CANMessage is placed in mDriverTransmitBuffer.

If the caller allocates heap memory for the messages, they can only be sure that a message is safe to free() after the driver has successfully received mDriverTransmitBufferSize additional messages.
Is this the intended usage?
The existing examples (thanks for providing these!) seem to cover the cases where either:

the function calling tryToSend(frame) never returns, ensuring that frame stays in scope.
or:
frame is declared static
I'd like to contribute an example for my use case, but I'd like to first know that the author believes it to be valid.

Thanks again.  The effort you've put into building and documenting this driver is outstanding.  I continue to be surprised.

Hello,
Nice ! So I can publish the new release of the library. What is the reference of your oscilloscope ?
A couple of questions:

Why is ACAN2517::available protected with mSPI.beginTransaction()/noInterrupts()? As far as I can see, it doesn't seem to involve a SPI transaction -- only a query of the driver's receive FIFO.

Yes, but the mDriverReceiveBuffer buffer is shared between two concurrent tasks, so it should be protected. More precisly, this method invoke count method that in turn reads the 32-bit mCount property. Maybe this protection is useless, it depends on how the 32-bit read access is performed by the processor. It the access is atomic, the protection is useless. I do not know the ESP32 instruction set, but I think access is atomic.  On Arduino Uno, access is not atomic, it is done by four 8-bit read accesses; the protection is performed by beginTransaction / endTransaction. So for simplying, I prefer protect for all platform, even it is useless for somes.

A question is about memory management for transmitted messages.  ACAN2517::enterInTransmitBuffer takes a reference to a CANMessage. If mControllerTxFIFOFull (always the case when mControllerTransmitFIFOSize = 0), the CANMessage is placed in mDriverTransmitBuffer.

Yes, enterInTransmitBuffer takes a reference, but following call mDriverTransmitBuffer.append performs an object copy, not a pointer copy. No dynamic allocation here, we do not need to perform a call to free or delete.
If the caller use a heap allocated message (by new CANMessage), it is its responsability to release it after tryToSend call.
Best regards,
Pierre

Le 30 mai 2019 à 23:40, Nick Kirkby<EMAIL_ADDRESS>a écrit :
Neat! I just tried this, it seems to work well.
Here I have two acan2517 on the same bus, both receiving a CAN message at the same time:
https://user-images.githubusercontent.com/20824939/58662680-a50e3380-82df-11e9-9b42-977c416dd6e1.png
The interrupts are asserted simultaneously, and handled serially without hangups.
A couple of questions:
Why is ACAN2517::available protected with mSPI.beginTransaction()/noInterrupts()? As far as I can see, it doesn't seem to involve a SPI transaction -- only a query of the driver's receive FIFO.
A question is about memory management for transmitted messages. ACAN2517::enterInTransmitBuffer takes a reference to a CANMessage. If mControllerTxFIFOFull (always the case when mControllerTransmitFIFOSize = 0), the CANMessage is placed in mDriverTransmitBuffer.
If the caller allocates heap memory for the messages, they can only be sure that a message is safe to free() after the driver has successfully received mDriverTransmitBufferSize additional messages.
Is this the intended usage?
The existing examples (thanks for providing these!) seem to cover the cases where either:
the function calling tryToSend(frame) never returns, ensuring that frame stays in scope.
or:
frame is declared static
I'd like to contribute an example for my use case, but I'd like to first know that the author believes it to be valid.
Thanks again. The effort you've put into building and documenting this driver is outstanding. I continue to be surprised.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/pierremolinaro/acan2517/issues/5?email_source=notifications&email_token=AEWKZVHPSPTWO7LUUXA4TLDPYBCTJA5CNFSM4HPZFYYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWTS6TA#issuecomment-497495884, or mute the thread https://github.com/notifications/unsubscribe-auth/AEWKZVGNOJT4SOV5Y36QA2TPYBCTJANCNFSM4HPZFYYA.

Hi Pierre,
I'm using my friend's Saleae Logic Pro 8.
I had a few more problems with SPI contention between separate RTOS tasks.  These seem to be fixed with the following changes (in addition to yours):

using a singleton counting semaphore to grant access to isr_core
using a single instance of myESP32Task to service interrupts on both driver instances
diff here
I've not dug into this any further, as the CAN stack has reached a mostly-working state.

//           mSPI.beginTransaction (mSPISettings) ;
//             #ifdef ARDUINO_ARCH_ESP32
//               taskDISABLE_INTERRUPTS () ;
//             #endif
//               assertCS () ;
//                  ... Access the MCP2517FD ...
//               deassertCS () ;
//             #ifdef ARDUINO_ARCH_ESP32
//               taskENABLE_INTERRUPTS () ;
//             #endif
//           mSPI.endTransaction () ;

Pierre, I think perhaps the order should be:
//             #ifdef ARDUINO_ARCH_ESP32
//               taskDISABLE_INTERRUPTS () ;
//             #endif
//           mSPI.beginTransaction (mSPISettings) ;
//               assertCS () ;
//                  ... Access the MCP2517FD ...
//               deassertCS () ;
//           mSPI.endTransaction () ;
//             #ifdef ARDUINO_ARCH_ESP32
//               taskENABLE_INTERRUPTS () ;
//             #endif

The reason I think that, is because of the following stacktrace, in which an interrupt is handled before endTransaction() returns:
0x4008ce80: invoke_abort at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/panic.c line 155
0x4008d0b1: abort at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/panic.c line 170
0x40089862: xQueueGiveFromISR at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/queue.c line 1299
0x40081204: ACAN2517::isr() at /home/njames/Arduino/libraries/acan2517/src/ACAN2517.cpp line 695
0x40080f7a: can1_callback() at /home/njames/Arduino/ECU/ECU.ino line 36
0x40081251: __onPinInterrupt at /opt/arduino-1.8.9/hardware/expressif/esp32/cores/esp32/esp32-hal-gpio.c line 220
0x4008a5c9: vTaskExitCritical at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/tasks.c line 4304
0x40089661: xQueueGenericSend at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/queue.c line 828
0x400dd5f1: spiEndTransaction at /opt/arduino-1.8.9/hardware/expressif/esp32/cores/esp32/esp32-hal-spi.c line 765
0x400d880e: SPIClass::endTransaction() at /opt/arduino-1.8.9/hardware/expressif/esp32/libraries/SPI/src/SPI.cpp line 143
0x400d9316: ACAN2517::available() at /home/njames/Arduino/libraries/acan2517/src/ACAN2517.cpp line 614
0x400d90b6: MCP2517FD::_get_rx_buff(CAN_FRAME&) at /home/njames/Arduino/libraries/esp32_can/src/mcp2517fd.cpp line 107
0x4014ddf7: CAN_COMMON::get_rx_buff(CAN_FRAME&) at /home/njames/Arduino/libraries/can_common/src/can_common.cpp line 133
0x400d281e: handle_incoming_frames_1kHz() at /home/njames/Arduino/ECU/ECU.ino line 106
0x400d294a: CAN_task_1kHz(void*) at /home/njames/Arduino/ECU/ECU.ino line 153
0x40088d11: vPortTaskWrapper at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/port.c line 143

I've observed that interrupts can disrupt begin() also:
0x4008ce80: invoke_abort at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/panic.c line 155
0x4008d0b1: abort at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/panic.c line 170
0x40089862: xQueueGiveFromISR at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/queue.c line 1299
0x40081204: ACAN2517::isr() at /home/njames/Arduino/libraries/acan2517/src/ACAN2517.cpp line 695
0x40080f7a: can1_callback() at /home/njames/Arduino/ECU/ECU.ino line 36
0x40081251: __onPinInterrupt at /opt/arduino-1.8.9/hardware/expressif/esp32/cores/esp32/esp32-hal-gpio.c line 220
0x400d9974: ACAN2517::writeRegister(unsigned short, unsigned int) at /home/njames/Arduino/libraries/acan2517/src/ACAN2517.cpp line 963
0x400d9b49: ACAN2517::begin(ACAN2517Settings const&, void (*)(), ACAN2517Filters const&) at /home/njames/Arduino/libraries/acan2517/src/ACAN2517.cpp line 292
0x400d9e63: ACAN2517::begin(ACAN2517Settings const&, void (*)()) at /home/njames/Arduino/libraries/acan2517/src/ACAN2517.cpp line 198
0x400d26fe: configure_MCP_CAN_controllers() at /home/njames/Arduino/ECU/ECU.ino line 47
0x400d2763: MCP_watchdog_task(void*) at /home/njames/Arduino/ECU/ECU.ino line 79
0x40088d11: vPortTaskWrapper at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/port.c line 143

After making the above change in all functions, and adding taskDISABLE_INTERRUPTS()/taskENABLE_INTERRUPTS() to begin(), I seem to have reached a point where the two driver instances no longer interfere with one another.

Hi Nick,
Thank you for the reference, I have a  low-cost Salae 24MHz 8 channels, it doesn't have the same performance!
ESP32 API is not fully compatible with Arduino API, in particular SPI and interrupts are handled in a very different way. If you get run-time errors, I think it remains a race condition, and I have to study precisely what bbeginTransition / endTranssaction and taskDISABLE_INTERRUPTS / taskENABLE_INTERRUPTS actually do. I thought I did, but obviously there are still one or more mistakes.
Regards,
Pierre

Le 3 juin 2019 à 03:37, Nick Kirkby<EMAIL_ADDRESS>a écrit :
Hi Pierre,
I'm using my friend's Saleae Logic Pro 8 https://usd.saleae.com/products/saleae-logic-pro-8?variant=7076781686844&gclid=EAIaIQobChMIkZ3Xs5DM4gIVA6vsCh3vUQA9EAQYAyABEgJc9_D_BwE.
I had a few more problems with SPI contention between separate RTOS tasks. These seem to be fixed with the following changes (in addition to yours):
using a singleton counting semaphore to grant access to isr_core
using a single instance of myESP32Task to service interrupts on both driver instances
diff here https://github.com/pierremolinaro/acan2517/compare/master...nkirkby:fresh_start
I've not dug into this any further, as the CAN stack has reached a mostly-working state.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/pierremolinaro/acan2517/issues/5?email_source=notifications&email_token=AEWKZVAUIJRCE5PHBHUZJK3PYRYU7A5CNFSM4HPZFYYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWYC6VI#issuecomment-498085717, or mute the thread https://github.com/notifications/unsubscribe-auth/AEWKZVCJ543SYKWSGJASQCDPYRYU7ANCNFSM4HPZFYYA.

Here are some relevant sources for beginTransaction from my notes:

beginTransaction
spiTransaction
SPI_MUTEX_LOCK
spi->lock is a FreeRTOS mutex.

Some findings from the last few days:

I tried using a task notification instead of a semaphore for isr->isr_core signalling, per the FreeRTOS docs' recommendations.  This seems to work fine.
I observed some behavior where the interrupt pin could get stuck low, yet the ISR would never be triggered.  I fixed this by periodically checking the level of the mINT pin in isr_core.

I first tried fixing this by changing the interrupt type to ONLOW, but this resulted in a great flood of interrupts.

I had to add the IRAM_ATTR (docs) type qualifier to void ACAN2517::isr() to stop an exception about cached memory region access, copied below.

Guru Meditation Error: Core  1 panic'ed (Cache disabled but cached memory region accessed)
Core 1 register dump:
PC      : 0x400d79c0  PS      : 0x00060034  A0      : 0x80081250  A1      : 0x3ffbe780
A2      : 0x00000000  A3      : 0x00000000  A4      : 0x3ffd1674  A5      : 0x00000000
A6      : 0x3ffd1670  A7      : 0xffffffff  A8      : 0x80080f8c  A9      : 0x00000001
A10     : 0x3ffcfe0c  A11     : 0x00000000  A12     : 0x3ffba2c4  A13     : 0x0000abab
A14     : 0x00000000  A15     : 0x00060523  SAR     : 0x0000001b  EXCCAUSE: 0x00000007
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000
Core 1 was running in ISR context:
EPC1    : 0x40083015  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x400d79c0

Backtrace: 0x400d79c0:0x3ffbe780 0x4008124d:0x3ffbe7a0 0x40081e45:0x3ffbe7c0 0x40083012:0x3ffba1f0 0x400846eb:0x3ffba210 0x40088acd:0x3ffba230

Rebooting...

PC: 0x400d79c0: ACAN2517::isr() at /home/njames/Arduino/libraries/acan2517/src/ACAN2517.cpp line 688
EXCVADDR: 0x00000000

Decoding stack results
0x400d79c0: ACAN2517::isr() at /home/njames/Arduino/libraries/acan2517/src/ACAN2517.cpp line 688
0x4008124d: __onPinInterrupt at /opt/arduino-1.8.9/hardware/expressif/esp32/cores/esp32/esp32-hal-gpio.c line 220
0x40083012: spi_flash_op_block_func at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/spi_flash/cache_utils.c line 82
0x400846eb: ipc_task at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/ipc.c line 62
0x40088acd: vPortTaskWrapper at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/port.c line 143


Draft: fix(ChatbotConversationHistoryNav): Focus should go to launcher on close

Focus had been getting lost - switched up the DOM elements so they're always there and we just adjust the class. That seemed to fix it in the main chatbot demo. The main chatbot demo had only been broken on docked and overlay, which changed the DOM content.

Preview: https://virtual-assistant-pr-virtual-assistant-236.surge.sh


[WIP] deps<EMAIL_ADDRESS>

cleans up a lot of the deprecation notices :smile:

I think there was a plan to update this to beta.3 and then maybe ship the beta? I've added a WIP tag for now to show that this is intentionally not merged :wink:

Yeah that was the plan, I'll get that finished today :smile:

Was running into an odd bug where reset tokens weren't being cleared but that was happening on master as well as with these changes and I couldn't reproduce the issue on a live blog so I think it's just something local to me that's messed up. Would appreciate if someone could verify though that it doesn't cause the issue.
Issue I'm talking about: second request to authentication/revoke (to revoke the refresh_token) fails with a 401 error. This happened consistently on my local setup (multiple browsers w/incognito test, even re-cloned the repo and tried it fresh). Was testing it back as far as 0.7.6 and had the same issue, so not sure if it's just my local setup or something more going on.

@acburdine would you mind updating to the latest beta? We can get this some time on master then to make sure there are no regressions

Yep I'll do that when I'm back at my computer

Strange, we're getting a whole lot of deprecations for Ember.merge but that should be worked around according to the ESA code 🤔 I can't find anything in our own code that would be causing it either - perhaps a different addon?
In any case, we'll need to hide the deprecation before we can merge as it outputs so much additional text for every test that Travis gives up 😞

@kevinansfield rebased and that should fix the tests 👍


externalDocs does not take effect in UI schema when using the YamlEditor widget as well

Describe the bug

Steps to reproduce
Issue 1: When using the YamlEditor widget, the externalDocs does not take effect

Add a template with source https://github.com/unitong/test-upgrade?ref=main.
Go to the template details page. Add a 'externalDocs' to variable map_any.
e.g.

externalDocs:
   description: User Guide
   url: https://seal-io.github.io/docs/

Click on the preview button on UI Schema page.

Issue 2:  Inconsistent positions for Viewing Documents button.
When only the externalDocs field is present, the button is right-aligned. However, when the description is also present, the button is left-aligned.

Expected behavior

Environment

Walrus version: v0.5.0-rc3

Additional context
Add any other context about the problem here.

Environment

Walrus version: main e92cde6256262c9671c9d51475f0bee8669f6628
UI version: dev-258c8aa

Test Result: pass


Practical Penguins

This push it to test if linting passes

Please ignore the last two commit, I didn't intend to push them to PR. Didn't think the pr would automatically update after the event is over. @mjfernez's "fix image links" eafa072 is the expected final

Hello there.
Since this is a development server, we have followed the recommendations of Twilio and deployed our server using ngrok.com as outlined here. Unfortunately, the free version of ngrok only provides temporary domain names which expire when the host terminates the connection. Due to a power failure, I was unable to keep our server up at the link provided in the README and the URL has been reset.
The server is now currently running at https://703a80f71f4a.ngrok.io. I will do my best to keep my desktop running 24/7 to avoid resetting the link incessantly. However, anticipating a future power failure, any updated links will be provided in the comments below.
Apologies for any inconvenience

Needs a manual merge because the two latest commits need to be excluded.
No flake8 linting errors.

Alright, merging this PR without the last two commits worked, but it did mess up the commits GitHub showed here. It went down to just the last two that were not merged. I've changed the base of the PR to a different branch that does not have the changes yet to make them all show up for the review (and review comments). Unfortunately, I can't create a PR commit changelist here without the last two commits, but they are restricted to the readme, fortunately.

 This was merged. Just partially.

Sorry @SebastiaanZ, I told Vez to exclude the last two commit not thinking much about it. Didn't realize it was such an ordeal 😅 Git works until it doesn't.

Power outage due to storm. New link available here: http://5f0609769117.ngrok.io

Hopefully the last time I have to update this! Server is now running semi-permanently on a Raspberry Pi with cheap UPS and a no-ip domain: http://somewhereonthemoon.ddns.net:8000. Please note the "http" and the port "8000" both need to be specified in your browser


[Discussion] Rust integration in Nuttx

As a part of GSOC 2024, I wish to integrate Rust into Nuttx. For that, a new coding standard for Rust programming language will be required and there's no mention of it anywhere. Before writing any rust code, a coding standard would be required. Please give your inputs. I was able to find C coding standards at: C Coding Standard

@xiaoxiang781216 @anchao @raiden00pl Please give your suggestions.

NuttX doesn't support Rust yet, that's why no Rust coding standard exist in official document.
As far as I know, Rust defines an official coding standard, so I would suggest that NuttX follow this style too. @patacongo @acassis what do you thinking?

I think that it would worth to discuss Rust on NuttX with  @lupyuen https://lupyuen.github.io/ . I have seen lot of useful information on his site.

Hello @lupyuen then maybe I can start with Rust Apps for Nuttx? How should we communicate?

@rushabhvg Let's discuss over email<EMAIL_ADDRESS>I'm in Singapore (GMT+8) so my response may be slow. Thanks :-)

NuttX doesn't support Rust yet, that's why no Rust coding standard exist in official document. As far as I know, Rust defines an official coding standard, so I would suggest that NuttX follow this style too. @patacongo @acassis what do you thinking?

@xiaoxiang781216 you mean for Rust applications or Rust code used on kernel right? I think it makes sense because Rust developer could feel uncomfortable reading/write Rust code using NuttX Coding Style

Is this a suggestion that NuttX RTOS itself will move from C to Rust? Or a mix of the two? Sorry if it's a dumb question but I know nothing about rust other than what's on my car...

I would think that a mix of the two could be a maintenance problem.

Is this a suggestion that NuttX RTOS itself will move from C to Rust? Or a mix of the two? Sorry if it's a dumb question but I know nothing about rust other than what's on my car...

I thought exactly that when I read Xiang comments at first time, but no, he was just saying: let Rust code to use Rust coding style, that makes sense. But as Greg commented we need to figure out how to improve the maintenance to have two coding styles. Maybe just having CI checker for .c and .rs is enough, not sure

Is this a suggestion that NuttX RTOS itself will move from C to Rust? Or a mix of the two? Sorry if it's a dumb question but I know nothing about rust other than what's on my car...

I thought exactly that when I read Xiang comments at first time, but no, he was just saying: let Rust code to use Rust coding style, that makes sense. But as Greg commented we need to figure out how to improve the maintenance to have two coding styles. Maybe just having CI checker for .c and .rs is enough, not sure

Where would Rust code be used - approved to be used - though?

Where would Rust code be used - approved to be used - though?

It is somewhat less concerning if restricted to architecture- or board- specific logic as Alan suggested in an dev email.
Any use of use of Rust in the OS must have the support of the NuttX community.  Not just the small group of people with special interests in this issue.

Hello @rushabhvg and thank you for your interest in NuttX RTOS :-) My suggestions for the workplan in 5 simple steps is presented below :-)

Limit Rust use for APPLICATIONS ONLY and NOT THE KERNEL.
Work on application layer just like other programming languages do in NuttX (i.e. existing Basic code or new ZigLang apps created by @lupyuen).
Work out optional setup that will allow porting and running Rust applications on NuttX. Use most generic and well known Rust tool set for integration like [1].
Port some demo applications including peripherals use cases (i.e. UART, SPI, I2C, graphical display, audio, input, network).
Create documentation on how to setup local environment for Rust build, how to setup NuttX to work with Rust, how to build a firmware with NuttX and example Rust applications, how to port new Rust applications to NuttX (including KConfig, Makefile, etc).

[1] https://github.com/rust-embedded/awesome-embedded-rust

Okay @cederom I will follow this worklplan. ANd, work with @lupyuen .

Hi All: @rushabhvg couldn't register on the NuttX Mailing List to read our thoughts about Rust. Any idea how we can troubleshoot this? Thanks :-)

Hi @rushabhvg thanks for chatting over email (and listening to my rant on Rust pros and cons :-) I suggest we begin with this:

Let's build and run a simple Rust App on NuttX: https://gist.github.com/lupyuen/7be4bedc6a109b2c3d1201aee6030428
If you see this error, let's discuss over email: "Can't link soft-float modules with double-float modules"
Assuming our Rust App runs OK on NuttX: Let's port this LED Blinky App from C to Rust: https://github.com/lupyuen2/wip-pinephone-nuttx-apps/blob/nim/examples/hello/hello_main.c#L40-L85
ULEDIOC_SETALL is explained here: https://lupyuen.github.io/articles/nim#blink-an-led
Then we'll do the same for larger Rust Apps, hopefully we'll work out the Rust Coding Guidelines along the way. Thanks :-)

I have tried creating my account through this url when I click on "Subscribe to list" button, nothing happens. Kindly guide.

You can send a email to<EMAIL_ADDRESS>and then reply the received email

@lupyuen I think you pointed to hello world in C, the hello world in rust is at hello_rust. But as Dan Gohman ( @sunfishcode ) commented in this Rustix presentation, the integration has some issues, the way it was done we will need a wrapper (extern "C" {} ) for all functions of NuttX. I don't know if he still available to help us, let me ping him and see.

For the record: This PR explains why we're not using Rust Crates, cargo build and Cargo.toml in NuttX: https://github.com/apache/nuttx/pull/5566
Which presents interesting challenges for Rust Apps in NuttX :-) @rushabhvg Let's document the workarounds that we used (patching of ELF Header, RUSTFLAGS=-O), I think it will be highly useful for other devs

Some folks are wondering: Why not use the Rust Standard Library, instead of the barebones no_std? (Rust Core Library) Isn't the Rust Standard Library a lot simpler for doing Console I/O and other POSIX Operations?

Traditionally when we build firmware for Embedded Devices, we use no_std: https://docs.rust-embedded.org/book/intro/no-std.html

Each Embedded OS will have its own C Function for Console I/O. On NuttX: It just happens that we call the C Standard Library, because NuttX supports POSIX. On FreeRTOS: It would be a totally different C Function.

NuttX is a little different from other RTOS because it's compatible with POSIX. In theory, Rust Standard Library could run on NuttX, thanks to POSIX. But it needs work.

Rustix Project is working on supporting Rust Standard Library on NuttX. But it seems to have stalled:
https://www.reddit.com/r/rust/comments/zfwaqf/integrating_rustix_on_nuttx/
https://github.com/bytecodealliance/rustix/tree/nuttx
https://www.youtube.com/watch?v=JTJW6kOqf9I

In any case, running Rust Standard Library on Embedded Devices will have impact on Memory Size and Real-Time Performance. Consider Rust on ESP32: It supports Rust Standard Library as well as no_std: https://docs.esp-rs.org/book/overview/using-the-standard-library.html
ESP32 Rust Standard Library is not recommended if we need Small Memory Footprint, Direct Hardware Control and Real-Time Performance: https://docs.esp-rs.org/book/overview/using-the-core-library.html

So for NuttX: We should probably provide Minimal Rust Wrappers around the POSIX Functions that we actually need, instead of supporting the entire Rust Standard Library. If we look at LED Blinky: We'll need open(), close(), ioctl(), sleep(), ...
The Rust Wrappers should allow Strings and Pointers to be passed safely to/from NuttX. Maybe the Rustix Project has something we can borrow: https://github.com/bytecodealliance/rustix/tree/nuttx

FYI @rushabhvg Linux Kernel has Coding Guidelines and Templates that might be helpful:

Coding Guidelines for Rust in Linux Kernel: https://docs.kernel.org/rust/coding-guidelines.html
Rust Template for Out-Of-Tree Linux Kernel Module: https://github.com/Rust-for-Linux/rust-out-of-tree-module
Rust Crate for Linux Kernel Module: https://rust-for-linux.github.io/docs/v6.8-rc3/kernel/
(Since we don't allow Rust Crates in NuttX, we might need a similar preloaded library for NuttX Interfaces)
The links above are from the "Rust For Linux" website: https://rust-for-linux.com/

FYI: Zephyr OS is also working on supporting Rust Apps and Rust Drivers: https://github.com/zephyrproject-rtos/zephyr/issues/65837

@lupyuen I have a question that maybe you can answer.  Everything that I have read says that Rust runs "on top of an OS".  I can't find the exhaustive list of OS interfaces required by Rust.  Such a thing must exist somewhere to support porting to other OSs.
I checked a couple of specific interfaces.  malloc(), for example, seems to be required by Rust.
In KERNEL and PROTECTED build modes, malloc() is not available in the kernel.  kmm_malloc() must be used instead to allocate from the kernel heap.  So I suppose that in these modes you would need wrappers around all of the application OS functions required by Rust to use the internal OS functions:  To fix functionality in some cases.  What about cancellation points and returned errno values?  There is no errno within the OS.

Hi @patacongo :-) There are 2 "flavours" of Rust, depending on the Rust Libraries that we use:

Rust Standard Library: This is used by most Rust Apps on desktops and servers. Supports Heap Memory and the Rust Equivalent of POSIX Calls.
Rust Core Library (no_std): Barebones Rust Library that runs on Bare Metal, used by Rust Embedded Apps. Calls minimal libc functions, doesn't support Heap Memory and POSIX.

The malloc() that you mentioned: It's called by the Rust Standard Library. (Like this)
For Kernel Dev (like Linux): We'll use the Rust Core Library. Which doesn't support Heap Memory and doesn't need malloc().
But most Kernel Drivers will need Kernel Heap. That's why Linux Kernel also supports the alloc Rust Library / Crate. To implement Rust alloc, Linux Kernel calls krealloc() to allocate Kernel Heap. (Like this)
For NuttX Kernel: We'll implement Rust alloc by calling kmm_malloc().
Since we're calling Rust Core Library in the Kernel, we won't touch any POSIX Application Interfaces. So if we need to support the Kernel Equivalent of Cancellation Points and Errno, we'll have to build the Rust Library ourselves. (Here's the Rust Library for Linux Kernel)

Since we're calling Rust Core Library in the Kernel, we won't touch any POSIX Application Interfaces. So if we need to support the Kernel Equivalent of Cancellation Points and Errno, we'll have to build the Rust Library ourselves

No, I meant the opposite.  The kernel should never initiate a cancellation  point and should never modify the errno.  My concern was that any application interfaces called from a kernel-embedded, run-time library might do just that.
Related:  NuttX does not support shared libraries in these build modes.  This means that there might be multiple copies of whatever necessary run-time support is needed in each user and kernel address space.  The C libraries really have this same problem at present.

That is an interesting interview with Linus Torvalds about Rust: https://www.youtube.com/watch?v=YyRVOGxRKLg
Although he doesn't program in Rust, he seems to agree it is an important addition to Linux.


Move handler for focusing LOIs in onMapReady()

Fixes #1656

@scolsen  PTAL?

Found another issue while testing this change. https://github.com/google/ground-android/issues/1667

/gcbrun

/gcbrun


Remove the use of an external css file

resolves https://github.com/laravelio/laravel.io/issues/899

Thanks @rizwan3d. Does this looks good to you @tvbeek?

Thanks @rizwan3d. Does this looks good to you @tvbeek?

I personal prefer not to depend on loading any css / font from an external site on the other hand I understand that you don't want to host it local.
In that case I think this is already an improvement 👍

Thanks all!


python errors while downloading youtube vid

Checklist

[x ] I'm reporting a broken site support issue
[ x] I've verified that I'm running youtube-dl version 2<IP_ADDRESS>
[ x] I've checked that all provided URLs are alive and playable in a browser
[ x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[x ] I've searched the bugtracker for similar bug reports including closed ones
[ ] I've read bugs section in FAQ

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-f', 'bestaudio[ext=opus]', '--extract-audio', '--a
udio-quality', '192', '--audio-format', 'mp3', '--batch-file', 'download.txt', '
-v']
[debug] Batch file urls: ['https://www.youtube.com/watch?v=Pxj3wGj-SdM']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2<IP_ADDRESS>
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg 3.4
[debug] Proxy map: {}
[youtube] Pxj3wGj-SdM: Downloading webpage
[youtube] Pxj3wGj-SdM: Downloading video info webpage
[youtube] {18} signature length 104, html5 player vfleGIwAA
[youtube] {136} signature length 108, html5 player vfleGIwAA
[youtube] {247} signature length 108, html5 player vfleGIwAA
[youtube] {135} signature length 108, html5 player vfleGIwAA
[youtube] {244} signature length 104, html5 player vfleGIwAA
[youtube] {134} signature length 108, html5 player vfleGIwAA
[youtube] {243} signature length 108, html5 player vfleGIwAA
[youtube] {133} signature length 108, html5 player vfleGIwAA
[youtube] {242} signature length 104, html5 player vfleGIwAA
[youtube] {160} signature length 108, html5 player vfleGIwAA
[youtube] {278} signature length 104, html5 player vfleGIwAA
[youtube] {140} signature length 108, html5 player vfleGIwAA
[youtube] {249} signature length 104, html5 player vfleGIwAA
[youtube] {250} signature length 108, html5 player vfleGIwAA
[youtube] {251} signature length 108, html5 player vfleGIwAA
ERROR: requested format not available
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphopugs
4t\build\youtube_dl\YoutubeDL.py", line 807, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphopugs
4t\build\youtube_dl\YoutubeDL.py", line 861, in process_ie_result
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmphopugs
4t\build\youtube_dl\YoutubeDL.py", line 1634, in process_video_result
youtube_dl.utils.ExtractorError: requested format not available

Presione una tecla para continuar . . .

Description

Hi i wanted to donwload audio only of a youtube song, but python errors show up for unknown reason. here's the argument i used;
youtube-dl.exe -f "bestaudio[ext=opus]" --extract-audio --audio-quality 192 --audio-format mp3 --batch-file "download.txt" -v
download txt has only one line:
https://www.youtube.com/watch?v=Pxj3wGj-SdM
thanks in advance

Error message clearly tells you there is no bestaudio with ext == opus.

what extension does opus audio uses? i thought it was .opus


Binding with keycodes

If I use multiple keyboard layouts and need to execute my binding from the config, i need to switch to english layout.
My request is to add bindings with keycodes, like in i3.
bindcode 214 exec --no-startup-id /home/michael/toggle_beamer.sh

added in cd0a01f4de6e1489caa35bece331c81dbaab2587

e.g:
bind=SUPER,28,exec,amongus

(SUPER+T)

Thanks mate) You are awesome👍

Any chance of implementing something like sway's bindsym --to-code?

do I look like a sway dev? What is bindsym --to-code

He meant that it's will be great if it will be like
bind,SUPER,M,exec,blablabla

And
bindcode,SUPER,28,exec,blablabla

To be more understandable
On yours' choice)

prolly not, why? this works.

Basically it lets users define layout-independent keybindings. Like I wish there was a way to write
bind=SUPER,T,exec,amongus

but so that it would work with different layouts. Using wev every time I need to change a keymap is... uncomfortable? Also config full of numbers is not very readable.

Also config full of numbers is not very readable.

But thats what keycodes are. Guessing the keycode from a letter is dumb. What if someone uses dvorak, colemak? should I ignore those, should I not?
If you have a problem with readabiliy, then you can just
$Keycode_T=12345

bind=SUPER,$Keycode_T,exec,amongus

or
bind=SUPER,1234,exec,amongus    # binds to T

What if someone uses dvorak, colemak?

There are different ways to handle this.

Look at input:kb_layout
Allow user to specify which keyboard layout they want to use for a specific keybinding (that's what river does)

But anyway, if you don't want to maintain this feature, never mind.

but so that it would work with different layouts

I don't understand this. The key will just be repositioned on the keyboard, so what would the issue be? I'm not a fan of changing keys to fit a layout, keybindings should be mnemonic, thus independent of position.

Cyrillic layout doesn't share any keys with English (except for numbers and control keys of course).

There are some similarities, but they're still completely different keys with different keycodes. English "T" has nothing to do with Cyrillic "Т" and so on.

That makes sense, thanks for the explanation.


Traceback throws error in linprog

My issue is about  callbacks on scipy.optimize.linprog
Reproducing code example:

import scipy
from scipy.optimize import linprog
c = [-1, 4]
A = [[-3, 1], [1, 2]]
b = [6, 4]
x0_bounds = (None, None)
x1_bounds = (-3, None)

def linprog_verbose_callback(res): # copied from this github repository
    """
    A sample callback function demonstrating the linprog callback interface.
    This callback produces detailed output to sys.stdout before each iteration
    and after the final iteration of the simplex algorithm.
    Parameters
    ----------
    res : A `scipy.optimize.OptimizeResult` consisting of the following fields:
        x : 1D array
            The independent variable vector which optimizes the linear
            programming problem.
        fun : float
            Value of the objective function.
        success : bool
            True if the algorithm succeeded in finding an optimal solution.
        slack : 1D array
            The values of the slack variables. Each slack variable corresponds
            to an inequality constraint. If the slack is zero, then the
            corresponding constraint is active.
        con : 1D array
            The (nominally zero) residuals of the equality constraints, that is,
            ``b - A_eq @ x``
        phase : int
            The phase of the optimization being executed. In phase 1 a basic
            feasible solution is sought and the T has an additional row
            representing an alternate objective function.
        status : int
            An integer representing the exit status of the optimization::
                 0 : Optimization terminated successfully
                 1 : Iteration limit reached
                 2 : Problem appears to be infeasible
                 3 : Problem appears to be unbounded
                 4 : Serious numerical difficulties encountered
        nit : int
            The number of iterations performed.
        message : str
            A string descriptor of the exit status of the optimization.
    """
    x = res['x']
    fun = res['fun']
    success = res['success']
    phase = res['phase']
    status = res['status']
    nit = res['nit']
    message = res['message']
    complete = res['complete']

    saved_printoptions = np.get_printoptions()
    np.set_printoptions(linewidth=500,
                        formatter={'float': lambda x: "{0: 12.4f}".format(x)})
    if status:
        print('--------- Simplex Early Exit -------\n'.format(nit))
        print('The simplex method exited early with status {0:d}'.format(status))
        print(message)
    elif complete:
        print('--------- Simplex Complete --------\n')
        print('Iterations required: {}'.format(nit))
    else:
        print('--------- Iteration {0:d}  ---------\n'.format(nit))

    if nit > 0:
        if phase == 1:
            print('Current Pseudo-Objective Value:')
        else:
            print('Current Objective Value:')
        print('f = ', fun)
        print()
        print('Current Solution Vector:')
        print('x = ', x)
        print()

    np.set_printoptions(**saved_printoptions)

res = linprog(c, A_ub=A, b_ub=b, bounds=[x0_bounds, x1_bounds],callback=linprog_verbose_callback)

Error message:

IndexError                                Traceback (most recent call last)
<ipython-input-29-370a3c2dde72> in <module>
      6 x1_bounds = (-3, None)
      7 from scipy.optimize import linprog
----> 8 res = linprog(c, A_ub=A, b_ub=b, bounds=[x0_bounds, x1_bounds],callback=linprog_verbose_callback)

~/anaconda3/lib/python3.7/site-packages/scipy/optimize/_linprog.py in linprog(c, A_ub, b_ub, A_eq, b_eq, bounds, method, callback, options)
    464         if meth == 'simplex':
    465             x, status, message, iteration = _linprog_simplex(
--> 466                 c, c0=c0, A=A, b=b, callback=callback, _T_o=T_o, **solver_options)
    467         elif meth == 'interior-point':
    468             x, status, message, iteration = _linprog_ip(

~/anaconda3/lib/python3.7/site-packages/scipy/optimize/_linprog_simplex.py in _linprog_simplex(c, c0, A, b, maxiter, disp, callback, tol, bland, _T_o, **unknown_options)
    581
    582     nit1, status = _solve_simplex(T, n, basis, phase=1, callback=callback,
--> 583                                   maxiter=maxiter, tol=tol, bland=bland, _T_o=_T_o)
    584     # if pseudo objective is zero, remove the last row from the tableau and
    585     # proceed to phase 2

~/anaconda3/lib/python3.7/site-packages/scipy/optimize/_linprog_simplex.py in _solve_simplex(T, n, basis, maxiter, phase, status, message, callback, tol, nit0, bland, _T_o)
    375             c, A_ub, b_ub, A_eq, b_eq, bounds, undo = _T_o
    376             x, fun, slack, con, _, _ = _postsolve(
--> 377                 x, c, A_ub, b_ub, A_eq, b_eq, bounds, undo=undo, tol=tol
    378             )
    379             res = OptimizeResult({

~/anaconda3/lib/python3.7/site-packages/scipy/optimize/_linprog_util.py in _postsolve(x, c, A_ub, b_ub, A_eq, b_eq, bounds, complete, undo, tol)
   1115             if lb is None and ub is None:
   1116                 n_unbounded += 1
-> 1117                 x[i] = x[i] - x[n_x + n_unbounded - 1]
   1118             else:
   1119                 if lb is None:

IndexError: index 2 is out of bounds for axis 0 with size 2
  ...

Scipy/Numpy/Python version information:
1.2.1 1.16.4 sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0)

Thanks for your patience. I can't look into this in detail right now, but can you upgrade to SciPy 1.3 and see if that fixes your issue?
You might also try using method='interior-point' in 1.2.1, or if you upgrade,  method='revised simplex'.

@JayMan91 thanks for raising this as an issue. pr-9563 fixed this in SciPy 1.3 and it should now work as expected.

Thanks a lot, I am going to try after upgrading.


Add html support and switched ios-moe to OSS version.

Sorry, but I have not tested except Chrome.
In your gdx-dialogs-game, (maybe) everything works well.
Oh, these commits are based on libgdx 1.9.5-SNAPSHOT.

I will review when 1.9.5 is released.

libgdx 1.9.5 has been released, could you please review the code? I am going to update it this weekend.
(You know I am in junior high now and have lots of homework, so I feel sorry for this. )

I hope I will find time after xmas.

Thank you!!


Implement 'overlaps' spatial operator on bounds and use it on gridlayers

Implement an 'overlap' spatial operator in both L.Bounds and L.LatLngBounds, with a semantic of "the intersection of the given rectangles is a rectangle".
Note that this is technically not the same as the DE-9IM 'overlaps' operator, as will return true if both rectangles are the same.
This operator is used in L.GridLayer to prevent tiles just touching the later bounds from being loaded.

Looks like a good solution to me. Lets wait for #2981 commenters to try this out and then merge.

#2981 is that bug fixed in version 0.7.7?


New version: KDE.Okular.Nightly version 1235

[x] Have you signed the Contributor License Agreement?
[x] Have you checked that there aren't other open pull requests for the same manifest update/change?

[x] Does your manifest conform to the 1.2 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

@wingetbot run

@wingetbot run


Clickhouse firepit plugin

This changeset contains a clickhouse firepit plugin.
The changes to sqlstorage.py and splitter.py are to work around a problem where the clickhouse tables have to be fully qualified

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Aidan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

Can you run make lint on this and fix the easy stuff (like minor formatting issues)?

Rather than requiring all users to install psycopg, jaydebeapi, and clickhouse_driver, we should implement a plugin system as described here: https://packaging.python.org/guides/creating-and-discovering-plugins/#using-naming-convention


chore(build): move depdendencies enforcer script to build/scripts

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/camel-quarkus-pr/181/


CDN support

Hello,
I use this package in most of my laravel apps. Could you pls give me some hint how I can use CDN with the files compressed by this pkg?
Would be great if you had config options to integrate (maybe other) cdn packages.
Regards

Please take a look at the notify_command configuration option.
It accepts a closure that will be invoked every time new assets are pipelined. You can use it to hook to pipeline and upload your new assets to your CDN.


[Fix] Directly go to the top when click the submenu

Description
When clicking the submenu, it should keep the position and show the sub-items.
If we are at the top of the page, maybe it's ok.
But if we click it in the middle of the page, firstly it will move to the top of the page directly.
Solution
Change href="#" to href="javascript:void(0);".

It has been solved in f83057e .


Feature request: Book GUI in the middle of the screen

This would greatly improve the readability of books if they were centered vertically.
There is already a mod  that does that, but It would be great to have a all in one package with
Scribble.
Currently:

Request:

Ooh yes, this is something I was thinking about adding as a config option!

This took a bit longer than expected, sorry, but it's in 1.4.0!

This took a bit longer than expected, sorry, but it's in 1.4.0!

Lovely ❤


 I am not well enough versed with the inner workings of twilight, but tried to poke around and could not find where the actual parsing was happening, so I could not get any more info on that.

Cross referencing the docs, embed_channel_id, embed_enabled, member_count all seem to not be part of the partial guild object, but they all have defaults or are optional, so they should not be causing any problems.
I did notice, cross referencing the Partial Guild struct in serenity to the json that I recieved above that the following non-optional(to my knowledge) fields were missing:
    pub afk_timeout: u64,
    pub default_message_notifications: DefaultMessageNotificationLevel,
    pub emojis: HashMap<EmojiId, Emoji>,
    pub explicit_content_filter: ExplicitContentFilter,
    pub mfa_level: MfaLevel,
    pub owner_id: UserId,
    pub preferred_locale: String,
    pub premium_tier: PremiumTier,
    pub region: String,
    pub roles: HashMap<RoleId, Role>,
    pub system_channel_flags: SystemChannelFlags,
    pub verification_level: VerificationLevel,


Simplify memory declaration in @RegisterAiService

Would you like me to do that as part of the PR or should we take care of it later?

/i cna take care of it later. I want to try the new GPT4 turbo thingy too.

👌


[UX][Store] Improvements in API level forum section

Description:
When the user goes to API page ->forum tab  and click on "Create new topic" or clicks on a already added forum topic, the user is directed to main forum tab which confuses the user. If the user needs to go back to the API page s/he needs to go to API listing and go to the specific API page.
Suggestion: Add "Go back" option instead of "Topic list" when directed to main forum tab from API page so that s/he can go back to the API page s/he was before.
Suggested Labels:
UX, improvement
Affected Product Version:
2.5.0

Closing the issue as this is older than 3 years. Please reopen if the issue is valid still.


cmake: Extend cflags and add Debug build type to be debuggable with gdb

Add -ggdb flag when CMAKE_BUILD_TYPE=Debug, add more usefull and stricter compiler flags when supported.
cmake is now able to build debugabble binaries:
mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Debug ..

Thanks. Can you synchronize with head ?
2016-04-07 12:00 GMT+02:00 Jerry Jacobs<EMAIL_ADDRESS>
Add -ggdb flag when CMAKE_BUILD_TYPE=Debug, add more usefull and stricter
compiler flags when supported.
cmake is now able to build debugabble binaries:
mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Debug ..
You can view, comment on, or merge this pull request online at:
https://github.com/texane/stlink/pull/393
Commit Summary

cmake: Add -ggdb flag when CMAKE_BUILD_TYPE=Debug, add more usefull
and stricter compiler flags when supported

File Changes

M CMakeLists.txt
https://github.com/texane/stlink/pull/393/files#diff-0 (68)

Patch Links:

https://github.com/texane/stlink/pull/393.patch
https://github.com/texane/stlink/pull/393.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/texane/stlink/pull/393

Should be mergeable now, dont forget to update the README.md badge to your travis build. And enable building of pull-requests (Should be: https://travis-ci.org/texane/stlink).


Added some new motivational quotes

PULL REQUEST TEMPLATE
My PR closes #issue_number_here
👨💻 What did you do ?

Note to reviewers

📷 Screenshots

✔ Check List (Check all the applicable boxes)

[] My code follows the code style of this project.
[] This PR does not contain plagiarized content.
[] The title and description of the PR is clear and explains the approach.
[] I have read the contribution guideline properly and following the criteria.

can you please star the repo, as it is a criteria in the contribution section

i am addng your quotes,
please star the repo and help us to grow


add "fullscreen" option on MdDialog for "xs" devices

Hi @marcosmoura
I think a fullscreen option on MdDialog would be very useful for smarthpone usage. This is the description from the AngularMaterial library:
fullscreen {boolean=}: An option to toggle whether the dialog should show in fullscreen or not. Defaults to false.

This is planned. I will add this soon, after the changes related to #82


Committed spend trend chart

Added threshold to committed spend trend chart

Codecov Report

Merging #52 (262df3b) into main (ad56897) will decrease coverage by 0.26%.
The diff coverage is 0.00%.

:exclamation: Current head 262df3b differs from pull request most recent head 1f4cace. Consider uploading reports for the commit 1f4cace to get more accurate results

Additional details and impacted files

@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
- Coverage   12.64%   12.37%   -0.27%
==========================================
  Files          28       28
  Lines         704      719      +15
  Branches       84       90       +6
==========================================
  Hits           89       89
- Misses        615      630      +15

Impacted Files
Coverage Δ

.../routes/components/charts/cost-chart/CostChart.tsx
0.00% <0.00%> (ø)

...ents/committed-spend-trend/CommittedSpendTrend.tsx
0.00% <0.00%> (ø)

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 ad56897...1f4cace. Read the comment docs.


hust

hust home : https://www.hust.edu.cn/

@bufferflies I have to close this request without merging, because you requested to add a non-existent domain to this repository: Host alumni.hust.edu.com not found: 3(NXDOMAIN) Please ensure that you are familiar with this repository rules located at the bottom of this page and submit a new request with the correct information. Thank you for understanding!


Round up sdxl golden dispatch sizes and mi250 times by 10%.

See this discussion on Discord.
These are change detector tests with some use, but exact checking is too noisy and is causing significant churn across PRs and postsubmit CI runs. We could change the test script to allow a certain error range, but for now just increase the thresholds used in <= checks by about 10% (then drop a few digits to 0 so we don't give the appearance of high precision).
ci-exactly: build_packages,regression_test

I'd like to rebase the integration PR on top of this and see if regression tests will pass.


[Feature Request]:  Urgent correction is needed in the main page layout

How would you like to enhance the existing project.
Issue
PlayNow ! button is not visible. How anyone could play games?
Earlier I have worked on this project, that time the main page layout was quite good, but now it is totally clumsy. It looks very irritating and confusing. This will decrease user engagement and user interest.
See Current behavior

Describe breifly how would you implement the same.
Solution_steps

I will work on font sizes, alignments, and adjustments with the container.
I would add CSS to give it proper margin, padding, alignment, and other necessary features as per the requirement.
later I would add more features to make it totally good.

I want to work on this issue immediately.
Please assign this work to me, I would complete this task within few hours
Are you contributing for a program?
GSSoC23
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hi @Dimple-01 , I am assigning this issue to you. Kindly complete your work within a week. Good luck for your work!

Dear Ssitvit/Games-And-Go,
I have already made a pull request on this work please merge that.
Regards
Dimple
On Fri, Jul 7, 2023, 6:45 PM Pratigya Panwar @.***>
wrote:

Hi @Dimple-01 https://github.com/Dimple-01 , I am assigning this issue
to you. Kindly complete your work within a week. Good luck for your work!
—
Reply to this email directly, view it on GitHub
https://github.com/ssitvit/Games-and-Go/issues/705#issuecomment-1625400709,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A3MOOOAVHUT3NWT5WPEAA2TXPADXNANCNFSM6AAAAAAZ7LGZDM
.
You are receiving this because you were mentioned.Message ID:
@.***>


test\nlp\test_autohf_summarization.py error with pytest

@liususan091219
when running pytest test this error was prompted

What's your transformers version? This happened to me when it was 4.5, need to make sure it's the latest version (4.14)

works now. thank you


Won't return iitc after login on android

After login, it stay in browser and direct to offical ingress map instead of return to iitc app. I'm using samsung s7, android version is 8.0.0, and this situation has been happening for a while. It didn't happened before. Attachment is the screenshot I open iitc again after login by browser.

Update apk from here https://iitc.me/test/


RETR sending 150 when file isn't found

I'm struggling with a situation where my ftp client is trying to download a file using RETR and it sees the 150 mark response, but there is no file contents.  Upon digging into the code, it looks like in both _RETR_usingCreateReadStream and _RETR_usingReadFile a 150 is send and then the 550 is send.  I thought perhaps there was a bug in the client I was using, but to verify I tried to find the FTP spec.  The best I found was this: http://cr.yp.to/ftp/retr.html which says

The server may reject the RETR request without first responding with a mark. In this case the
server does not touch the data connection. RFC 959 allows code 550 for file-does-not-exist,
permission-denied, etc., and code 450 for out-of-memory, disk-failure, etc.

So, should the 150 not be sent? or is the client wrong for not checking for 550 after 150?

Found the RFC: https://tools.ietf.org/html/rfc959, but it doesn't spell it out as definitely as I would like.

Command-Reply Sequences
    In this section, the command-reply sequence is presented.  Each
     command is listed with its possible replies; command groups are
     listed together.  Preliminary replies are listed first (with
     their succeeding replies indented and under them), then
     positive and negative completion, and finally intermediary
     replies with the remaining commands from the sequence
     following.  This listing forms the basis for the state
     diagrams, which will be presented separately.

     ... removed for brevity ...
           RETR
             125, 150
                 (110)
                 226, 250
                 425, 426, 451
             450, 550
             500, 501, 421, 530

This leads me to believe that either (125/150) or (450/550) or (500/501/421/530) should be returned after a RETR.  Am I wrong?  Is this a bug?

Thanks @phillipgreenii! I have had similar trouble understanding the spec in cases like this. I believe you are interpreting it correctly. Thanks for the PR!