gitea remote command execution with default installation

Gitea version (or commit ref): current (https://github.com/go-gitea/gitea/commit/9458880c068c985692a49caf608f0057c73790bf)

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes (provide example URL)
[ x] No
[ ] Not relevant

Description
Hi,  I found a issue just like https://github.com/gogs/gogs/issues/5469.
With gitea's default installation, I can authenticate as arbitrary account. But due to some server configuration, I can't reproduce in https://try.gitea.io .
As this is a very severe issue, I won't post details here. Can you give me your email address and I send the details to you?

@5alt thanks for report<EMAIL_ADDRESS>is the email address.

The remote execution could be mitigated by setting DISABLE_GIT_HOOKS to true, however the account takeover is still a significant issue.

@techknowlogick thanks! Account takeover is significant, but being able to prevent remote code execution right now is a huge deal.

https://github.com/gogs/gogs/issues/5469#issuecomment-433280865


enforcing constraints on prediction of sin t, cos t

Hi,
Can you let me know how do you enforce that sin t and cos t are for the same angle in the prediction.
For example, the prediction can be 0 for sin t and 0 for cos t simultaneously. Which is not possible since sin t = 0 would imply that cos t = 1

I actually do it now by taking sum of squares of predictions of last 2 features and dividing last 2 with the square root of the sum. Is this how you did it ?
Can I ask why you did not regress on theta rather than on sin t and cos t. Is that so that the final loss function has some nice properties ?

This constraint is not being enforced. You can regress the angle itself, and that should be fine.

I see. Doesn't that result in strange boxes during training?
What was the benefit of regressing on sin, cos? Was that helpful in a better loss function gradients?

Ping!

I didn't notice anything strange; the benefit was to restrict the range to [-1,1], but as I said regressing the angle itself also works.


Hits: escapeHits should happen after transformItems

Describe the bug 🐛
If a transformItems which modifies _highlightResult in a way which makes it fail the regex to give classes is used, it will not apply the regex anymore
To Reproduce 🔍
https://codesandbox.io/s/kxvqkx7j5v?module=%2Fsrc%2Fapp.js
workaround needed for now:
https://codesandbox.io/s/2vwml193j?module=%2Fsrc%2Fapp.js
Expected behavior 💭
Elements are already escaped and transformed, before transformItems.
Environment:

Version: 2.10.3

Does it need a fix for InstantSearh.js 2?
We'll definitely fix that in InstantSearch.js 3.

IMO this is a breaking change, and can thus be done only in InstantSearch.js v3

Closed in #3251.


Remote URL upload doesn't work.

All file uploads via URL fail even bite-sized files.

Because upload is not considered stable, it may fail randomly


Call action when column is dragged

Hi,
I was wondering if it's possible to identify or to add an action when a column has it's position changed. (draggable set to 'true')

https://github.com/offirgolan/ember-light-table/pull/258
Do the onColumnDrag and onColumnDrop actions satisfy your needs? :slightly_smiling_face:

Yup, I looked on the doc on the table session and column session. This can be found in the t.head session. Really sorry and thank you so much!

Absolutely no problem! Glad you're happy with ELT. :)


5 ➡ 6 (main)

➡ Forward port
Port ign-gazebo5 to main
Branch comparison: https://github.com/ignitionrobotics/ign-gazebo/compare/main...ign-gazebo5
Note to maintainers: Remember to Merge with commit (not squash-merge or rebase)
🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

On Ubuntu Focal, ign gazebo -v 4 lights.sdf isn't working as expected. When I use the sliders to change the colors of the lights in the component inspector nothing happens. Also, when I transform an object then try to interact with the lights again I can't. The same is happening in main as well (after applying this fix https://github.com/ignitionrobotics/ign-gazebo/pull/1018). This could be related to https://github.com/ignitionrobotics/ign-rendering/issues/402

https://github.com/ignitionrobotics/ign-rendering/issues/402 turned out not to be the issue. I'm still having the same issues with lights but it's also happening in main so I've ticketed an issue: https://github.com/ignitionrobotics/ign-gazebo/issues/1022
I believe I was not able to interact with the lights after transforming an object because the tool was still in transform mode. When I'm back in select mode I'm able to select the light entities again.
There are failing tests from SdfGenerator_TEST.cc should they be addressed in this PR?

I believe I was not able to interact with the lights after transforming an object because the tool was still in transform mode. When I'm back in select mode I'm able to select the light entities again.

Great detective work!

There are failing tests from SdfGenerator_TEST.cc should they be addressed in this PR?

I've noticed these new test failures on main too, but haven't looked into it: https://build.osrfoundation.org/job/ignition_gazebo-ci-main-bionic-amd64/75/

There are failing tests from SdfGenerator_TEST.cc should they be addressed in this PR?

I've noticed these new test failures on main too, but haven't looked into it: https://build.osrfoundation.org/job/ignition_gazebo-ci-main-bionic-amd64/75/

Should be fixed by https://github.com/ignitionrobotics/ign-gazebo/pull/1023


video going into slowmotion

I'm submitting a ...

[*] bug report
[ ] feature request
[ ] support request

General infomration
os is LibreELEC (official): 9.0.2 (Odroid_C2.arm), addon version is 0.14.6, I have elementum running in the background
Prerequisites

[*] Are you running the latest version?

Description
in the last week or too, I'm unable to watch anything on netflix, I have a 1GB internet connection, when I try to play something, the sound runs ok but the image is slow, that slow that it goes out of sync with the audio.
Steps to Reproduce

install the os above
install netflix from the repo
not sure if it is related but install elementum
try to play any show. I've tried umbrella academy

Expected behavior:
video and audio are in sync and the speed is as it should
Actual behavior:
audio plays as should, video plays slower, causing them to do out of sync.
Context (Environment)
os is LibreELEC (official): 9.0.2 (Odroid_C2.arm) on odroidc2
Installation

[*] I installed the plugin via zip from the Releases page: url is https://github.com/castagnait/repository.castagnait/raw/master/repository.castagnait-1.0.0.zip
[ ] I´m using the Netflix Repo
[ ] I´m using a different source (Please tell which)

Operating System

[ ] Linux (x86/x64)
[ ] OSX (x86/x64)
[ ] Windows (x86/x64)
[*] Linux (ARM)
[ ] Android

Additional informatin on the environment
os is LibreELEC (official): 9.0.2 (Odroid_C2.arm) on odroidc2
Debug log
attached, was to large to upload
kodi.debug.xz.gz
Other information
none

Same here.
Video will start lagging and video and audio is out of sync.
Sometimes it corrects itself but it takes several minutes.
If I pause when this is happening, the video continues for 2-3 seconds while audio stops.

Same here.
Video will start lagging and video and audio is out of sync.
Sometimes it corrects itself but it takes several minutes.
If I pause when this is happening, the video continues for 2-3 seconds while audio stops.

can you pinpoint when it started?

No sorry, have not been using Netflix for a while.Den 13 juli 2019 16:25 skrev Dagg Stompler<EMAIL_ADDRESS>Same here.
Video will start lagging and video and audio is out of sync.
Sometimes it corrects itself but it takes several minutes.
If I pause when this is happening, the video continues for 2-3 seconds while audio stops.
can you pinpoint when it started?
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

Somehow TVH PVR Client is being called to open all channels when kodi starts, there is an update/rescan process being made by TVH in order to update all muxes, so just to be sure where the issue is, could you please disable THS PVR Cliente, I would said all PVR clients, disable EPG wrapppers , processors and post processors engines , and finally disable TVH, then reboot and try again if it fails please share the new log.
The issue you are sharing point to VidoePlayer/AudioiPlayer busy to receve new calls, so when you try to play a movie, it hangs, because, it is not able to close all the Queue.

Greetings,

will disabling the tvh addon in kodi will be enough? should I disable elementum too?

Sent: Saturday, July 13, 2019 at 10:56 PM
From: "Jaker MX"<EMAIL_ADDRESS>To: "asciidisco/plugin.video.netflix"<EMAIL_ADDRESS>Cc: "Dagg Stompler"<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [asciidisco/plugin.video.netflix] video going into slowmotion (#698)
Somehow TVH PVR Client is being called to open all channels when kodi starts, there is an update/rescan process being made by TVH in order to update all muxes, so just to be sure where the issue is, could you please disable THS PVR Cliente, I would said all PVR clients, disable EPG wrapppers , processors and post processors engines , and finally disable TVH, then reboot and try again if it fails please share the new log.
The issue you are sharing point to VidoePlayer/AudioiPlayer busy to receve new calls, so when you try to play a movie, it hangs, because, it is not able to close all the Queue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Greetings,   will disabling the tvh addon in kodi will be enough? should I disable elementum too?   Sent: Saturday, July 13, 2019 at 10:56 PM From: "Jaker MX"<EMAIL_ADDRESS>To: "asciidisco/plugin.video.netflix"<EMAIL_ADDRESS>Cc: "Dagg Stompler"<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [asciidisco/plugin.video.netflix] video going into slowmotion (#698) Somehow TVH PVR Client is being called to open all channels when kodi starts, there is an update/rescan process being made by TVH in order to update all muxes, so just to be sure where the issue is, could you please disable THS PVR Cliente, I would said all PVR clients, disable EPG wrapppers , processors and post processors engines , and finally disable TVH, then reboot and try again if it fails please share the new log. The issue you are sharing point to VidoePlayer/AudioiPlayer busy to receve new calls, so when you try to play a movie, it hangs, because, it is not able to close all the Queue. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Just from Kodi

here. sa,me behavior.
kodi.log.gz

How do you have set your video and audi settings in player settings?
can you try seting hdmi as audio device instead of ALSA or PULSEAUDIO... and do NOT use syncaudio video, it is being made by inputstream stream control.
I also, set inputstream to lower resolutions lets beginin 480 and then increase.... and then share your findings please.

Greenting,

How do you have set your video and audi settings in player settings?
can you try seting hdmi as audio device instead of ALSA or PULSEAUDIO... and do NOT use syncaudio video, it is being made by inputstream stream control.
this is libreelec, I don't have much option... I see pulseaudio is enabled.

I also, set inputstream to lower resolutions lets beginin 480 and then increase.... and then share your findings please.
I've never got resolution above 480p while it is set to 720p
the strange issue is that I never get this behavior is I play robo auto poly for my kids. everything else results with the same issue.

I understand, but please try to change your default audio device, since it is failing to initialize.. for testing prupurses try hdmi or analog, dont use ALSA (It is not configured correctly) or PulseAudio (Bluetooth support)...
The scenario you are talking about...is pretty usual, I have never bla bla bla....but, we are on new kodi version, new libraries, new addon dependencies, etc.... if you want to solve this, please help us to help you, so disable audio / video sync, set another audio device, and set you IPA RESOLUTION/SECURE TO 480 and then increase...
I am pretty sure that it is sound device  relaed issue....because, video looks that is starting fine...well, I prefger another playre than paplayer, but if you dont have MMAL option available, it is what it is
And the mos important thing, ,please share your complete logs...
Pulse Audio es enabled becuase  Librespot or you have a bluetooth audio device paired...but you have your player set to work with 6 channels,thing that is not possible by now on LE/PulseAudio.

found the issue, as it says in the docs, currently with my hw (odroidc2), it is impossible to play fhd, the adaptive input config was set to max. after changing it to 720p. the stream is working weel.
I'll test with the other problematic streams and will mark as solved if all works ok.
I wonder why it didn't pop up sooner, also if I select manual stream, I don't get any list, it just streams away.
will update asap.

cool, remeber you are running 32 bit kodi, if you want better performance I suggest to use a 64 bit linux distro that support your device,since widevine is a softwae based encrypted  codec, as more resources it has better performance you will get...

also, ALSA and PULSEAUDIO does not have the cupport as native HW drivers,So use hwbased insted of them.

cool, remeber you are running 32 bit kodi, if you want better performance I suggest to use a 64 bit linux distro that support your device,since widevine is a softwae based encrypted codec, as more resources it has better performance you will get...

that up to the guys at LE to do, I don't have the time to do it.
I can setup an img using buildroot but that requires alot of planing, I don't have the time for it...

also, ALSA and PULSEAUDIO does not have the cupport as native HW drivers,So use hwbased insted of them.

hwbased?

Unless this has changed recently, there isn't a 64-bit ARM Widevine library available - there's only 32-bit ARM or 64-bit x86_64. It's one of the main reasons why LibreELEC continues to use 32-bit userland on ARM.

Still having the issue here.
Stranger Things 3 is unwatchable.
3-5 seconds out of sync.
I do not have any PVR enabled.
I only have ALSA and PULSE in the options.
Running on a Intel Nuc, LibreElec and Kodi 19.

same here, every few minutes it goes out of sync, the log shows this:
2019-07-22 21:43:33.581 T:2743509872 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
2019-07-22 21:43:37.719 T:3600532336 WARNING: Previous line repeats 8 times.
2019-07-22 21:43:37.719 T:3600532336  NOTICE: [plugin.video.elementum] ^[[36mDEBU  main         ... Notification     ^[[0mGot notification from xbmc/Player.OnResume: {"item":{"episode":1,"season":1,
2019-07-22 21:44:27.749 T:4088781200  NOTICE: NFS is idle. Closing the remaining connections.
2019-07-22 21:50:03.719 T:2591634288 WARNING: Repository add-on repository.elementum uses plain HTTP for add-on downloads in path http://<IP_ADDRESS>:65220/repository/elgatito/ - this is insecure and w
2019-07-22 21:50:14.380 T:3600532336 WARNING: Previous line repeats 4 times.
2019-07-22 21:50:14.380 T:3600532336  NOTICE: [plugin.video.elementum] ^[[36mDEBU  main         ... Notification     ^[[0mGot notification from xbmc/Player.OnPause: {"item":{"episode":1,"season":1,"
2019-07-22 21:50:18.397 T:2743509872 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
2019-07-22 21:50:30.104 T:3600532336 WARNING: Previous line repeats 22 times.
2019-07-22 21:50:30.104 T:3600532336  NOTICE: [plugin.video.elementum] ^[[36mDEBU  main         ... Notification     ^[[0mGot notification from xbmc/Player.OnResume: {"item":{"episode":1,"season":1,
2019-07-22 21:52:08.214 T:3600532336  NOTICE: [plugin.video.elementum] ^[[36mDEBU  main         ... Notification     ^[[0mGot notification from xbmc/Player.OnPause: {"item":{"episode":1,"season":1,"
2019-07-22 21:52:08.749 T:2743509872 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
pressing pause results with the video catching up with the sound and the pause kicks in.
elementum and hts are enabled.

I had to drop the quality to sd, 720p didn't worked, the audio and video are a bit off-sync but it is tolerable.
still I'd be happy to have at least 720p working.


pint.errors.UndefinedUnitError: 'sm3' is not defined in the unit registry

Got this while running a map between agribalyse-3.1.1-biosphere and ecoinvent-3.9-biosphere:
flowmapper map --fields config/simapro-ecoinvent.py \
               --format randonneur --output-dir mappings/snapshot --matched-source --matched-target \
               data/agribalyse-3.1.1-biosphere.json \
               data/ecoinvent-3.9-biosphere.json

5667 source flows...
4718 target flows...
 56%|█████████████████████████████████████████████████                                       | 3159/5667 [01:32<01:13, 34.27it/s]
Traceback (most recent call last):
pint.errors.UndefinedUnitError: 'sm3' is not defined in the unit registry

From ecoinvent:

The update for 3.9 introduces a change to the reference conditions for natural gas products (except natural gas liquids): these products are now measured in standard cubic meters (Sm3), which is defined as the volume the gas takes up at 15°C (288.15°K) and atmospheric pressure (1.013 bar).


error with dev digest calculation

refgenie --version
refgenie 0.10.0-dev

Not sure why this doesn't work...
bulker run databio/refgenie:0.7.6 refgenie build Aureococcus_anophagefferens_JGI_1_0/fasta --genome-description 'Aureococcus anophagefferens JGI 1.0 ' --files fasta=/project/shefflab/www/refgenie_plantref/Aureococcus_anophagefferens_JGI_1_0-fasta-fasta

Bulker config: /project/shefflab/rivanna_config/bulker.yaml
Activating crate: databio/refgenie:0.7.6

Using 'default' as the default tag for 'Aureococcus_anophagefferens_JGI_1_0/fasta'
Recipe validated successfully against a schema: /home/ns5bc/.local/lib/python3.6/site-packages/refgenie/schemas/recipe_schema.yaml
Building 'Aureococcus_anophagefferens_JGI_1_0/fasta:default' using 'fasta' recipe
Initializing genome: Aureococcus_anophagefferens_JGI_1_0
Traceback (most recent call last):
  File "/home/ns5bc/.local/bin/refgenie", line 10, in <module>
    sys.exit(main())
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenie/refgenie.py", line 705, in main
    refgenie_build(gencfg, asset_list[0]["genome"], asset_list, recipe_name, args)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenie/refgenie.py", line 536, in refgenie_build
    alias=ori_genome)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenconf/refgenconf.py", line 1330, in initialize_genome
    asdl = ssc.retrieve(druid=d, reclimit=1)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenconf/henge.py", line 149, in retrieve
    return reconstruct_item(string, schema, reclimit)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenconf/henge.py", line 102, in reconstruct_item
    substr in string.split(DELIM_ITEM)]
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenconf/henge.py", line 102, in <listcomp>
    substr in string.split(DELIM_ITEM)]
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenconf/henge.py", line 130, in reconstruct_item
    return self.retrieve(string, reclimit, raw)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenconf/henge.py", line 137, in retrieve
    raise NotFoundException(druid)
refgenconf.henge.NotFoundException:  not found in database

The first time I ran it, got this error:
Initializing genome: Aureococcus_anophagefferens_JGI_1_0
Traceback (most recent call last):
  File "/home/ns5bc/.local/bin/refgenie", line 10, in <module>
    sys.exit(main())
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenie/refgenie.py", line 705, in main
    refgenie_build(gencfg, asset_list[0]["genome"], asset_list, recipe_name, args)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenie/refgenie.py", line 536, in refgenie_build
    alias=ori_genome)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenconf/refgenconf.py", line 1328, in initialize_genome
    d, _ = ssc.load_fasta(fasta_path)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenconf/seqcol.py", line 109, in load_fasta
    fa_object = parse_fasta(fa_file)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenconf/seqcol.py", line 238, in parse_fasta
    return pyfaidx.Fasta(fa_file)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/pyfaidx/__init__.py", line 999, in __init__
    build_index=build_index)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/pyfaidx/__init__.py", line 423, in __init__
    self.build_index()
  File "/home/ns5bc/.local/lib/python3.6/site-packages/pyfaidx/__init__.py", line 519, in build_index
    line = line.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

now every time I run it, I get the first error

updated to the latest commit from today the line numbers chagne slightly:
Using 'default' as the default tag for 'Aureococcus_anophagefferens_JGI_1_0/fasta'
Recipe validated successfully against a schema: /home/ns5bc/.local/lib/python3.6/site-packages/refgenie/schemas/recipe_schema.yaml
Building 'Aureococcus_anophagefferens_JGI_1_0/fasta:default' using 'fasta' recipe
Initializing genome: Aureococcus_anophagefferens_JGI_1_0
Traceback (most recent call last):
  File "/home/ns5bc/.local/bin/refgenie", line 10, in <module>
    sys.exit(main())
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenie/refgenie.py", line 713, in main
    refgenie_build(gencfg, asset_list[0]["genome"], asset_list, recipe_name, args)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenie/refgenie.py", line 543, in refgenie_build
    alias=ori_genome)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenconf/refgenconf.py", line 1330, in initialize_genome
    asdl = ssc.retrieve(druid=d, reclimit=1)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenconf/henge.py", line 149, in retrieve
    return reconstruct_item(string, schema, reclimit)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenconf/henge.py", line 102, in reconstruct_item
    substr in string.split(DELIM_ITEM)]
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenconf/henge.py", line 102, in <listcomp>
    substr in string.split(DELIM_ITEM)]
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenconf/henge.py", line 130, in reconstruct_item
    return self.retrieve(string, reclimit, raw)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/refgenconf/henge.py", line 137, in retrieve
    raise NotFoundException(druid)
refgenconf.henge.NotFoundException:  not found in database

is it expecting a non-gzipped fasta file? but doesn't the recipe expect a gzipped fasta file?

I'm investigating this now. Were you able to build any other fasta asset? I haven't seen this error before even though I've build couple of them.

it should handle both a zipped file and a non-zipped file. This is the first one I tried, I haven't successfully built any. I'm also investigating.

I wonder if the file extension is the problem.

Look:
ssc =  refgenconf.seqcol.SeqColClient({})
ssc.load_fasta("/project/shefflab/www/refgenie_plantref/Aureococcus_anophagefferens_JGI_1_0-fasta-fasta")
Out[7]: ('cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc', [])

In [8]: x = ssc.load_fasta("/project/shefflab/www/refgenie_plantref/Aureococcus_anophagefferens_JGI_1_0-fasta-fasta")

In [9]: ssc.retrieve(x[0])
---------------------------------------------------------------------------
NotFoundException                         Traceback (most recent call last)
<ipython-input-9-88bcfdbe5931> in <module>
----> 1 ssc.retrieve(x[0])

~/.local/lib/python3.6/site-packages/refgenconf/henge.py in retrieve(self, druid, reclimit, raw)
    147
    148         schema = self.schemas[item_type]
--> 149         return reconstruct_item(string, schema, reclimit)
    150
    151     @property

~/.local/lib/python3.6/site-packages/refgenconf/henge.py in reconstruct_item(string, schema, reclimit)
    100             if "type" in schema and schema["type"] == "array":
    101                 return [reconstruct_item(substr, schema["items"], reclimit) for
--> 102                         substr in string.split(DELIM_ITEM)]
    103             elif schema["type"] == "object":
    104                 # else:  # assume it's an object

~/.local/lib/python3.6/site-packages/refgenconf/henge.py in <listcomp>(.0)
    100             if "type" in schema and schema["type"] == "array":
    101                 return [reconstruct_item(substr, schema["items"], reclimit) for
--> 102                         substr in string.split(DELIM_ITEM)]
    103             elif schema["type"] == "object":
    104                 # else:  # assume it's an object

~/.local/lib/python3.6/site-packages/refgenconf/henge.py in reconstruct_item(string, schema, reclimit)
    128                         if isinstance(reclimit, int):
    129                             reclimit = reclimit - 1
--> 130                         return self.retrieve(string, reclimit, raw)
    131                 else:
    132                     print("not recursive")

~/.local/lib/python3.6/site-packages/refgenconf/henge.py in retrieve(self, druid, reclimit, raw)
    135
    136         if not druid + ITEM_TYPE in self.database:
--> 137             raise NotFoundException(druid)
    138
    139         item_type = self.database[druid + ITEM_TYPE]

NotFoundException:  not found in database

('cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc', '')
('cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc_item_type', 'AnnotatedSequenceList')
('cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc_digest_version', 'md5')

it's the extension:
[mstolarczyk@MichalsMBP r_compat]: cp t7.fa.gz t7-fasta

[mstolarczyk@MichalsMBP r_compat]: refgenie build -c g.yml t7/fasta --files fasta=t7-fasta
Using 'default' as the default tag for 't7/fasta'
Recipe validated successfully against a schema: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/refgenie/schemas/recipe_schema.yaml
Building 't7/fasta:default' using 'fasta' recipe
Initializing genome: t7
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/bin/refgenie", line 10, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/refgenie/refgenie.py", line 715, in main
    refgenie_build(gencfg, asset_list[0]["genome"], asset_list, recipe_name, args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/refgenie/refgenie.py", line 545, in refgenie_build
    alias=ori_genome)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/refgenconf/refgenconf.py", line 1334, in initialize_genome
    d, _ = ssc.load_fasta(fasta_path)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/refgenconf/seqcol.py", line 109, in load_fasta
    fa_object = parse_fasta(fa_file)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/refgenconf/seqcol.py", line 238, in parse_fasta
    return pyfaidx.Fasta(fa_file)
  File "/Users/mstolarczyk/Library/Python/3.6/lib/python/site-packages/pyfaidx/__init__.py", line 996, in __init__
    build_index=build_index)
  File "/Users/mstolarczyk/Library/Python/3.6/lib/python/site-packages/pyfaidx/__init__.py", line 423, in __init__
    self.build_index()
  File "/Users/mstolarczyk/Library/Python/3.6/lib/python/site-packages/pyfaidx/__init__.py", line 519, in build_index
    line = line.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
[mstolarczyk@MichalsMBP r_compat]: refgenie build -c g.yml t7/fasta --files fasta=t7-fasta
Using 'default' as the default tag for 't7/fasta'
Recipe validated successfully against a schema: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/refgenie/schemas/recipe_schema.yaml
Building 't7/fasta:default' using 'fasta' recipe
Initializing genome: t7
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/bin/refgenie", line 10, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/refgenie/refgenie.py", line 715, in main
    refgenie_build(gencfg, asset_list[0]["genome"], asset_list, recipe_name, args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/refgenie/refgenie.py", line 545, in refgenie_build
    alias=ori_genome)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/refgenconf/refgenconf.py", line 1336, in initialize_genome
    asdl = ssc.retrieve(druid=d, reclimit=1)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/refgenconf/henge.py", line 149, in retrieve
    return reconstruct_item(string, schema, reclimit)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/refgenconf/henge.py", line 102, in reconstruct_item
    substr in string.split(DELIM_ITEM)]
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/refgenconf/henge.py", line 102, in <listcomp>
    substr in string.split(DELIM_ITEM)]
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/refgenconf/henge.py", line 130, in reconstruct_item
    return self.retrieve(string, reclimit, raw)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/refgenconf/henge.py", line 137, in retrieve
    raise NotFoundException(druid)
refgenconf.henge.NotFoundException:  not found in database

but that item is in the database, you can see it with .show!

can you explain why the error is different on the first vs subsequent trials? The database doesn't persist, does it?

The error is different because the pyfaidx.Fasta method behaves unexpectedly. It tries to read the compressed FASTA file in, and at first it raises an error, then it "succeeds":
[mstolarczyk@MichalsMBP r_compat]: cp t7.fa.gz t7-gzipped-noext

[mstolarczyk@MichalsMBP r_compat]: ipy
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 05:52:31)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.5.0 -- An enhanced Interactive Python. Type '?' for help.

autoreload startup script has been executed!

In [1]: import pyfaidx

In [2]: x=pyfaidx.Fasta("t7-gzipped-noext")
---------------------------------------------------------------------------
UnicodeDecodeError                        Traceback (most recent call last)
<ipython-input-2-271b6bac7783> in <module>
----> 1 x=pyfaidx.Fasta("t7-gzipped-noext")

~/Library/Python/3.6/lib/python/site-packages/pyfaidx/__init__.py in __init__(self, filename, default_seq, key_function, as_raw, strict_bounds, read_ahead, mutable, split_char, filt_function, one_based_attributes, read_long_names, duplicate_action, sequence_always_upper, rebuild, build_index)
    994             sequence_always_upper=sequence_always_upper,
    995             rebuild=rebuild,
--> 996             build_index=build_index)
    997         self.keys = self.faidx.index.keys
    998         if not self.mutable:

~/Library/Python/3.6/lib/python/site-packages/pyfaidx/__init__.py in __init__(self, filename, default_seq, key_function, as_raw, strict_bounds, read_ahead, mutable, split_char, duplicate_action, filt_function, one_based_attributes, read_long_names, sequence_always_upper, rebuild, build_index)
    421                             self.indexname, self.filename), RuntimeWarning)
    422                 elif build_index:
--> 423                     self.build_index()
    424                     self.read_fai()
    425                 else:

~/Library/Python/3.6/lib/python/site-packages/pyfaidx/__init__.py in build_index(self)
    517                     for i, line in enumerate(fastafile):
    518                         line_blen = len(line)
--> 519                         line = line.decode()
    520                         line_clen = len(line.rstrip('\n\r'))
    521                         lastline = i

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

In [3]: x=pyfaidx.Fasta("t7-gzipped-noext")

so I think a possible solution is to handle the format detection on our own and make sure we feed an uncompressed FASTA file to pyfaidx.Fasta

we want to be able to feed a compressed one to it, though.

yes, our parse_fasta function takes care of unzipping the FASTA file, but we depend on exceptions raised by pyfaidx.Fasta to determine if we need to unzip it. It just needs to happen first, if needed. Then we can pass an unzipped FASTA .

how about this? https://github.com/refgenie/refgenconf/pull/104
we know the input is gzipped so we can just set it.

yes, that worked for me as well.


Upgrade requirements

Codecov Report

Merging #55 (da994a1) into main (304d974) will decrease coverage by 2.02%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##              main      #55      +/-   ##
===========================================
- Coverage   100.00%   97.97%   -2.03%
===========================================
  Files            6        6
  Lines          247      247
  Branches        48       48
===========================================
- Hits           247      242       -5
- Misses           0        3       +3
- Partials         0        2       +2

Impacted Files
Coverage Δ

src/django_linear_migrations/compat.py
82.14% <0.00%> (-17.86%)
:arrow_down:

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 304d974...da994a1. Read the comment docs.


Opens Website on every startup

VS Code opens the VSCode website every time I start VS Code. ( I know it should only open on first startup after install)

VSCode Version:1.21
OS Version: High Sierra 10.13.3

Steps to Reproduce:

Install VSCode on OSx
Open it. Then Close it and reopen.

Does this issue occur when all extensions are disabled?: Yes

Please see if you can find any logged output that could help us find the source of the issue:

run code --verbose from the command line and attach the output
in Code select Help | Toggle Developer Tools and select the Console
attach any output you see in the Console you can find

Thanks!


Activate torch.cuda.amp.autocast() for roformer inference

audio_separator/separator/architectures/mdxc_separator.py: Re-enabled the torch.cuda.amp.autocast() context manager in the demix method to improve performance by using automatic mixed precision.

If there are any specific reasons to keep it commented out, feel free to close this. However, enabling this can improve the speed by 1.5 to 2 times, for example, for the MelBand-Karaoke model, so we would prefer to keep it enabled if possible.

Hey, thanks for raising this PR!
I got excited about a potential 2x speedup, but when I tested on my own machine I get the same inference time but get this warning:
/Users/andrew/miniforge3/envs/audio-separator-clean-py311/lib/python3.11/site-packages/torch/amp/autocast_mode.py:250: UserWarning: User provided device_type of 'cuda', but CUDA is not available. Disabling
I assume this needs tidying up to only try to reference CUDA if CUDA is available?
Cheers,
Andrew

Thank you for your feedback, Andrew. I've expanded the use of autocast to all models and made some adjustments to address the issues you mentioned. Here's a summary of the changes, test results, and additional considerations:
Changes Made

README.md: Updated usage instructions and added a description for the new --use_autocast parameter.
audio_separator/separator/separator.py:

Added use_autocast attribute to the Separator class and its initialization method.
Implemented logic to check and use autocast during the separation process.

audio_separator/utils/cli.py: Added --use_autocast argument to the CLI and passed it to the Separator class.
tests/unit/test_cli.py: Added a unit test for the use_autocast argument.
poetry.lock: Updated PyTorch dependency to version 2.4 to utilize the newly introduced is_autocast_available() function.

Inference Time Test Results
I've conducted extensive tests across various models and hardware configurations. The results show that inference speed improved 1-2 times for most models when using autocast on GPU. However, the results vary for CPU and Apple Silicon. Here are the key findings:

GPU (Colab T4): Significant speedup observed for most models.
CPU: Autocast caused issues with some models, resulting in no progress or runtime errors.
Apple Silicon (M1 Mac): No significant difference observed with autocast.

●Colab T4 (audio file length=03m59s)

model
use_autocast?
other config
separation duration (average of 3 measurements)

mel_band_roformer_karaoke_aufr33_viperx_sdr_10.1956.ckpt
True
--output_format=WAV --mdxc_segment_size=1101 --mdxc_override_model_segment_size --mdxc_overlap=2
01m29s

False

03m34s

UVR-DeEcho-DeReverb.pth
True
--output_format=WAV --vr_window_size=320 --vr_aggression=50 --vr_enable_tta
00m54s

False

01m02s

htdemucs.yaml
True
--output_format=WAV
00m22s

False

00m33s

UVR_MDXNET_KARA_2.onnx
True
--output_format=WAV
00m26s

False

00m27s

MDX23C_D1581.ckpt
True
--output_format=WAV
00m32s

False

01m11s

●Colab CPU (audio file length=00m02s)

model
use_autocast?
other config
separation duration (average of 3 measurements)

mel_band_roformer_karaoke_aufr33_viperx_sdr_10.1956.ckpt
True
--output_format=WAV --mdxc_segment_size=1101 --mdxc_override_model_segment_size --mdxc_overlap=2
∞ (tqdm shows no progress)

False

(RuntimeError)

UVR-DeEcho-DeReverb.pth
True
--output_format=WAV --vr_window_size=320 --vr_aggression=50 --vr_enable_tta
(RuntimeError)

False

00m31s

htdemucs.yaml
True
--output_format=WAV
∞ (tqdm shows no progress)

False

00m53s

UVR_MDXNET_KARA_2.onnx
True
--output_format=WAV
00m23s

False

00m20s

MDX23C_D1581.ckpt
True
--output_format=WAV
∞ (tqdm shows no progress)

False

06m43s

●M1 Mac (audio file length=01m30s)

model
use_autocast?
other config
separation duration (average of 3 measurements)

mel_band_roformer_karaoke_aufr33_viperx_sdr_10.1956.ckpt
True
--output_format=WAV --mdxc_segment_size=1101 --mdxc_override_model_segment_size --mdxc_overlap=2
08m05s

False

08m04s

UVR-DeEcho-DeReverb.pth
True
--vr_window_size=320 --vr_aggression=50 --vr_enable_tta
00m41s

False

00m42s

htdemucs.yaml
True
--output_format=WAV
00m31s

False

00m31s

UVR_MDXNET_KARA_2.onnx
True
--output_format=WAV
00m16s

False

00m16s

MDX23C_D1581.ckpt
True
--output_format=WAV
01m37s

False

01m38s

Additional Considerations

Due to the issues observed with CPU inference when using autocast (no progress or errors for some models), we've set --use_autocast to False by default. This ensures compatibility across different hardware configurations out of the box.
Regarding Apple Silicon, the lack of performance improvement is due to the current absence of MPS support for autocast. However, we expect this to be supported in the future. In fact, looking at the PyTorch 2.5 source code, it appears that MPS support is being implemented. Once this support is available, we anticipate performance improvements for Apple Silicon users as well.

These changes and considerations should provide a more robust and future-proof implementation of autocast in our project. Users can now benefit from the performance improvements on supported hardware while maintaining compatibility across different systems.

Nice work, thank you!
I'll test and merge tomorrow when I have time 🙏

Tested and merged, should be live from the latest audio-separator release: 0.22.0
Thanks again for your contribution!


Unexpected behaviour on Nexus 7

This shim causes a quite weird behaviour on Nexus 7 devices (running stock Android Lollipop). If you add the shim to your page, all images become automatically draggable (even if the "draggable" attribute has not been set on them) - and all other events on these images are prevented. In effect, you can now drag nearly every image, but you cannot interact with them anymore (e.g. if you use them as buttons)...

All images are draggable even without the shim, at least on desktop browsers. We do have problems with sending click events to draggable elements though, as discussed in #23. We have a short-term hack in place for anchor elements and this could potentially be extended to cover images as well. I'll look into it. Speaking long-term, we have a major rewrite underway which should handle these scenarios closer to the way that desktop browsers do.
Now, you said that all other events on these images are prevented. I'm curious, what other events besides click are you having trouble with?

Thanks for answering that quick. If I remove the shim, the images are not draggable. They only become draggable once I include the shim. So the shim is causing this behaviour.
By all other events I meant click events in particular, I haven't tried others so far.

The shim is causing the behavior indeed. That's the whole point of the shim, isn't it? The mobile browsers don't have drag-n-drop support, so this shim adds that functionality. Some elements, like <a/> & <img/> have the draggable attribute true by default, even on the mobile browsers. So images being draggable is the correct & expected behavior. If you don't want this, you have to explicitly set the draggable attribute to false on those images.
The images not receiving a click event when you just press on them is a bug however, which I'll attempt to solve.

Ah ok, I see. Did not know that draggable images are the default if draggable support is enabled.


update peer dependency requirement to include chai 4

Context
Fixes #47
What has been done

Updated the peer dependency requirement for chai to be < 5.
This so chai-json-schema again installs without errors on npm versions <= 3 and chai versions >= 4.

How to test

run npm test

What is not in this PR

development dependency update to chai 4:

chai 4 drops support for node 0.10 and 0.12,
chai-json-schema still supports these as per package.json and the ci config
upping chai 4 would mean the build would fail on 0.10 and 0.12 => chai-json-schema would have to remove these from the build matrix and drop support for these versions. I'm not qualified to take that decision.

A version bump
Assuming this is done by a maintainer on triggering the release procedure

Thank you @sverweij. I have published a new release.

Top, dank!


⚠ Bofrost.lu has degraded performance

In 696a39b, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1312 ms

Resolved: Bofrost.lu performance has improved in dbecaf4 after 17 minutes.


fix: reenable better stack

Changes

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#669  👈
#668
#667
#641
#635
#633
#632 : 1 other dependent PR (#662 )
#628 : 1 other dependent PR (#629 )
#613
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @MasterPtato and the rest of your teammates on  Graphite


JS error when loading more lines in diff view

Description
This error happens when clicking multiple times in a row on the load-more-lines button:
repo-code.js:195 Uncaught (in promise) DOMException: Failed to set the 'outerHTML' property on 'Element': This element has no parent node.
    at http://vmlinux03data:3000/assets/js/index.js?v=1.21.10:101:15689
    at Generator.next (<anonymous>)
    at u (http://vmlinux03data:3000/assets/js/index.js?v=1.21.10:101:12477)

Url path: /[org]/[project]/commit/[commit-hash]
Gitea Version
1.21.10
Can you reproduce the bug on the Gitea demo site?
No.
Looks like the button gets disabled while loading more text with 1.22, so could not reproduce it there.
Log Gist
No response
Screenshots

Git Version
2.20.1
Operating System
Debian 10
How are you running Gitea?
Downloaded gitea-1.21.10-linux-amd64 from release page
Database
MySQL/MariaDB

Looks like the button gets disabled while loading more text with 1.22, so could not reproduce it there.

Yes, as this has been fixed in #29385 by using htmx instead of jQuery, plz wait the new release of v1.22.
I will close this issue, feel free to reopen if you have more questions.


CONTRIBUTING.md

Created contributing guidelines
What does this PR do?
Created contributing markdown file, fixed the issue and have created a pull request for the same.
Fixes #1760
Type of change

[x] New feature (non-breaking change which adds functionality)
[ ] This change requires a documentation update

Checklist:

[x] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code and corrected any misspellings
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes

Hey, i have changed the license and remove code of conduct since there
wasn't one for it yet .
Thanks!
On Thu, Oct 12, 2023 at 4:44 PM Deepak Prabhakara @.***>
wrote:

@.**** commented on this pull request.
In CONTRIBUTING.md
https://github.com/boxyhq/jackson/pull/1766#discussion_r1356665920:

+## Development

+1. Fork the repository.
+2. Clone your fork to your local environment.
+3. Install dependencies.
+4. Implement changes, add features, or enhance documentation.
+5. Test your changes.
+6. Submit a pull request against the main branch.
+
+## License
+
+Jackson is an open-source project released under the MIT License. Your contributions are subject to the terms of this license.
+
+### Code of Conduct
+
+Please ensure that your contributions align with our https://github.com/boxyhq/saas-starter-kit/blob/main/CODE_OF_CONDUCT.md. Be respectful, inclusive, and considerate of others.
Wrong url here
—
Reply to this email directly, view it on GitHub
https://github.com/boxyhq/jackson/pull/1766#pullrequestreview-1673900726,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ASJZT43ULJUEYTTDW63OFXTX67GK3ANCNFSM6AAAAAA55IEZGA
.
You are receiving this because you authored the thread.Message ID:
@.***>

Added code of conduct as well linked the github links for the above ,thanks.
On Thu, Oct 12, 2023 at 9:18 PM Vansh @.***> wrote:

Hey, i have changed the license and remove code of conduct since there
wasn't one for it yet .
Thanks!
On Thu, Oct 12, 2023 at 4:44 PM Deepak Prabhakara <
@.***> wrote:

@.**** commented on this pull request.
In CONTRIBUTING.md
https://github.com/boxyhq/jackson/pull/1766#discussion_r1356665920:

+## Development

+1. Fork the repository.
+2. Clone your fork to your local environment.
+3. Install dependencies.
+4. Implement changes, add features, or enhance documentation.
+5. Test your changes.
+6. Submit a pull request against the main branch.
+
+## License
+
+Jackson is an open-source project released under the MIT License. Your contributions are subject to the terms of this license.
+
+### Code of Conduct
+
+Please ensure that your contributions align with our https://github.com/boxyhq/saas-starter-kit/blob/main/CODE_OF_CONDUCT.md. Be respectful, inclusive, and considerate of others.
Wrong url here
—
Reply to this email directly, view it on GitHub
https://github.com/boxyhq/jackson/pull/1766#pullrequestreview-1673900726,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ASJZT43ULJUEYTTDW63OFXTX67GK3ANCNFSM6AAAAAA55IEZGA
.
You are receiving this because you authored the thread.Message ID:
@.***>

@deepakprabhakara sir please review and close it or let me know for any changes since there wasn't clear description of this issue and i had to search througth other refrences and see documentation on this.

One last minor thing to fix (the URL for Code of Conduct)

fixed that @deepakprabhakara and pointed it to main branch ,thanks

@VanshBhardwaj24 Can you please keep it consistent with https://github.com/boxyhq/saas-starter-kit/blob/main/CONTRIBUTING.md, latest commit makes changes that diverges from this.

@VanshBhardwaj24 Can you please keep it consistent with https://github.com/boxyhq/saas-starter-kit/blob/main/CONTRIBUTING.md, latest commit makes changes that diverges from this.

Done !

Thanks @VanshBhardwaj24


check for crossed market

as a test of correctness would be great to do assert(best bid < best ask)

i did it in helix-trace maybe in other places it'd be useful also

That assertion is not a good correctness test because it is only true during continuous trading hours after uncross for NASDAQ OMX Nordic market model, for example.


Output option for PdfExportOptions

@volkanceylan
I have added an output parameter in options per PDFExport.
The possible values are:

file (or null are default)
window
window-print
newwindow
newwindow-print

The window e newwindow values open generated PDF in current or in new browser tab.
The -print version open the PDF and automatically open the print dialog.
The file value (or not passed value) has the standard download action.

I had also thought to directly pass the jsPDF parameter. I opted for this choice only because the jsPDF parameters are a bit misleading in name (thinking of users who do not know). But beyond that I see no problems in your propose. Parameter output and autoPrint is well.
I am now investigating the possibility of inserting a "split button dropdowns" for PDF button, to have all the choices together.

I had also thought to directly pass the jsPDF parameter. I opted for this choice only because the jsPDF parameters are a bit misleading in name (thinking about users who do not know). But beyond that I see no problems in your propose, the output and autoPrint are well.
Also I am now investigating the possibility of inserting a "Split button dropdowns" for the PDF button, to have all the choices together.

Sorry closed for error :)

yes they are bit obscure

How do I proceed? Should I change the code to use the jsPDF output parameter?

I'll have a look at it, thanks.


Concurrency Issue with AfterFind with PostgreSQL

Description
In one of my models I implement the AfterFindable interface in order to query dependent entities from the database (via foreign keys).
If I access the list endpoint for said entity, the access fails from time to time with the following error message from the lib/pg driver:
unable to fetch records: pq: unexpected Parse response 'C'

This problem only appeared with PostgreSQL, I was not able to reproduce it with MySQL (did not try sqlite).
Possible fix
I was able to fix this problem with PostgreSQL by changing callbacks.go lines 31-45
from:
	wg := &errgroup.Group{}
	for i := 0; i < rv.Len(); i++ {
		func(i int) {
			wg.Go(func() error {
				y := rv.Index(i)
				y = y.Addr()
				if x, ok := y.Interface().(AfterFindable); ok {
					return x.AfterFind(c)
				}
				return nil
			})
		}(i)
	}

	return wg.Wait()

to:
	for i := 0; i < rv.Len(); i++ {
		y := rv.Index(i)
		y = y.Addr()
		x, ok := y.Interface().(AfterFindable)
		if !ok {
			continue
		}
		if err := x.AfterFind(c); err != nil {
			return err
		}
	}
	return nil

This is why I think, the problem is related to a concurrency issue. The issue might be related to https://github.com/lib/pq/issues/81.
I understand, that from a performance point of view, the existing implementation is better, because it processes the the AfterFind callbacks for each item in the result set in concurrently.
Based on the age of above mentioned bug in lib/pq, I don't think this bug will be solved soon and I therefore think, this problem needs to be addressed in pop. I propose to add a database dialect specific implementation of afterFind for PostgreSQL.
Steps to Reproduce the Problem

Two tables, T1 has foreign key (t2_id) on T2.id
Add a method AfterFind to the model for T1, which queries T2 based on the foreign key (e.g. c.Find(&t2, t1.t2ID)
Access the list endpoint of T1 (GET /t1/list)

Expected Behavior
The endpoint GET /t1/list should always be successful with PostgreSQL the same way it is with MySQL. The pg driver should not fail.
Actual Behavior
From time to time, the request to GET /t1/list does return an error like:
unable to fetch records: pq: unexpected Parse response 'C'

Info

OS: Linux 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
pop version: github.com/gobuffalo/pop/v5 v5.0.9
pop through buffalo: yes

Additional links:

https://github.com/lib/pq/issues/635
https://github.com/lib/pq/issues/713
https://github.com/lib/pq/issues/142

I just hit the same problem while using MySQL. The mysql db driver reports the following errors:
[mysql] 2020/04/20 10:31:35 packets.go:446: busy buffer
[mysql] 2020/04/20 10:31:35 connection.go:158: bad connection
[mysql] 2020/04/20 10:31:35 packets.go:446: busy buffer
[mysql] 2020/04/20 10:31:35 packets.go:427: busy buffer

Again for me, the patch mentioned above did solve the problem for me.

To unblock myself I created a fork with the above mentioned fix in place: https://github.com/breml/pop/tree/fix-afterfind. Please let me know, if you would like to have a PR.

Now that we moved away from lib/pq to jackc/pgx this should no longer be an issue. Could you check with the latest master if that's the case?

@aeneasr The same problem exists also with MySQL. How will the move to jackc/pgx help there? I think the problem is not related to the actual DB driver but to the way the drivers are used in a concurrent way.

Well, we would only need to fix it in MySQL ;)

I got hit by the same issue on mysql, while eager saving. Doesn't happen all the time, but often enough to be noticeable.
My workaround was to just save one item at a time :(


Crash when insert an invalid char in array, and object

Insert invalid cha c in array and object will cause the problem.
This problem is related to cursor location.
https://github.com/kneasle/sapling/blob/9fed519567bc7b8a7aa61fb56395edeb9cf7b6cc/src/editor/dag.rs#L410-L415
``

This crashes regardless of which node is under the cursor.  I've found a fix, and I'm making regression tests for this.

This crashes regardless of which node is under the cursor.  I've found a fix, and I'm making regression tests for this.

Actually, if #63 is fixed then this bug will not be possible.

Actually, if #63 is fixed then this bug will not be possible.

I've been doing some digging, and the cause of the problem is that Json::is_valid_child returns a blanket true if the node being inserted into is Json::Object or Json::Array.  By extension, this also returns true for invalid characters, and so an error is not returned, and so Json::from_char is called and then unwrapped, causing the crash.
This will be fixed along with #63, because Json::is_valid_child will take a type-safe intermediate type and so it isn't possible to insert an invalid node.

I've been doing some digging, and the cause of the problem is that Json::is_valid_child returns a blanket true if the node being inserted into is Json::Object or Json::Array.  By extension, this also returns true for invalid characters, and so an error is not returned, and so Json::from_char is called and then unwrapped, causing the crash.
This will be fixed along with #63, because Json::is_valid_child will take a type-safe intermediate type and so it isn't possible to insert an invalid node.


Record Validation Filter: zero-ack produce requests combined with partial batch forwarding causes memory leak and OOM

Describe the bug
If I have a RecordValidationFilter with forwardPartialRequests enabled, and a producer that is producing lots of zero-ack produce requests we are leaking memory.

We put data in a correlation map about the failed topic partitions and then expect to augment them back into the response.
In the zero-ack produce request case there is no response to augment and the correlated data sits in the map forever
This can grow until OOM

To Reproduce

run up a kafka broker on 9092

Configure a filter that blocks null values on all topics with forwardPartialRequests enabled
adminHttp:
  endpoints:
    prometheus: {}
virtualClusters:
  demo:
    targetCluster:
      bootstrap_servers: localhost:9092
    clusterNetworkAddressConfigProvider:
      type: PortPerBrokerClusterNetworkAddressConfigProvider
      config:
        bootstrapAddress: localhost:9192
    logNetwork: false
    logFrames: false
filters:
- type: RecordValidation
  config:
      rules: []
      defaultRule:
        valueRule:
          allowNulls: false
          allowEmpty: true
      forwardPartialRequests: true

hammer the proxy with zero-ack produce requests where some partitions contain only invalid records and some partitions contain only valid records to prompt the partial request forwarding logic to kick in.
package org.example;

import org.apache.kafka.clients.admin.Admin;
import org.apache.kafka.clients.admin.AdminClientConfig;
import org.apache.kafka.clients.admin.NewTopic;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.ProducerConfig;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.common.serialization.StringSerializer;

import java.util.List;
import java.util.Map;

public class Main {
    public static void main(String[] args) {
        Admin admin = Admin.create(Map.of(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092"));
        int numPartitions = 20;
        String topic = "test5";
        try {
            admin.createTopics(List.of(new NewTopic(topic, numPartitions, (short) 1))).all().get();
        } catch (Exception e) {
            System.out.println(e);
        }
        KafkaProducer<String, String> producer = new KafkaProducer<>(Map.of(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9192", ProducerConfig.LINGER_MS_CONFIG, 1000, ProducerConfig.ACKS_CONFIG, "0"), new StringSerializer(), new StringSerializer());
        int i = 0;
        while(true) {
            int partition = i++ % numPartitions;
            producer.send(new ProducerRecord<>(topic, partition, "key", partition % 2 == 0 ? null : "it's present"));
        }
    }
}

observe Kroxylicious memory in jconsole or equivalent head to the heap limit and requests eventually start to slow down to a crawl:

Expected behavior
Not a big old memory leak, that's for sure.
It's unclear what record validation bejaviour should be in the context of zero-ack requests. The producer is firing and forgetting, with no response from the broker expected. We still want to prevent the bad data hitting the broker. Maybe we need some metrics to let the user know we are preventing writes.
We also need to ensure we do not respond to zero-ack requests. Currently we respond from the filter if we invalidate the whole ProduceRequest because all topic-partitions contain invalid records or we are transactional and any record in the request was invalid.

@k-wall I was having a play with fixing this, is the javadoc on this method correct?
/**
     * Signals the desire of the filter that the connection is closed.
     *
     * @return last stage in the fluent API.
     */
    TerminalStage<R> drop();

as opposed to:
/**
     * Signals the desire of the filter that the connection is closed.
     *
     * @return next stage in the fluent API.
     */
    TerminalStage<R> withCloseConnection();

I think drop doesn't close.

is the javadoc on this method correct?

No, it should say that the request is dropped.  The only time this makes sense is for requests that don't get a rely (zero-ack produce being the only one), otherwise the client will be left awaiting a response that will never come.

It's unclear what record validation bejaviour should be in the context of zero-ack requests. The producer is firing and forgetting, with no response from the broker expected. We still want to prevent the bad data hitting the broker. Maybe we need some metrics to let the user know we are preventing writes.

Metrics would certainly be nice.  I also think that record validation should have the option to dead letter rather than reject.

Triaged, 2024/8/21,  we said we should kill the forwardPartialRequests feature.  New issue will be raised.  Closing issue.


Drawer becomes unresponsive for some inputs

I'm using nwg-drawer 0.2.8 on NxOS 22.05.
How to reproduce

Use NixOS?
Install Tor Browser.
Launch nwg-drawer, start typing tor-

In my setup, the program just freezes and freezes my entire Sway desktop. If I hit Escape, the nwg-drawer exits and my desktop is back to normal after some time (around 10 s).
I don't know why Tor Browser in particular triggers this behavior. I have also noticed that nwg-drawer is not very responsive in general. Response to keypresses takes always takes at least half a second.
nwg-drawer output:
time="2022-08-03T23:50:40+02:00" level=info msg="term: foot"
time="2022-08-03T23:50:40+02:00" level=info msg="lang: fr_FR"
time="2022-08-03T23:50:40+02:00" level=info msg="Config dir: /home/olivier/.config/nwg-drawer"
time="2022-08-03T23:50:40+02:00" level=info msg="Copying file: /home/olivier/.config/nwg-drawer/drawer.css"
time="2022-08-03T23:50:40+02:00" level=info msg="Found 0 pinned items"
time="2022-08-03T23:50:40+02:00" level=info msg="Found 136 desktop files"
time="2022-08-03T23:50:40+02:00" level=info msg="Skipped 3 duplicates; 46 .desktop entries hidden by \"NoDisplay=true\""
time="2022-08-03T23:50:40+02:00" level=info msg="/home/olivier/.config/nwg-drawer/preferred-apps.json file not found"
time="2022-08-03T23:50:40+02:00" level=info msg="/home/olivier/.config/nwg-drawer/excluded-dirs file not found"

(nwg-drawer:2624720): dbind-WARNING **: 23:50:40.107: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
time="2022-08-03T23:50:40+02:00" level=error msg="ERROR: /home/olivier/.config/nwg-drawer/drawer.css css file not found or erroneous. Using GTK styling."
time="2022-08-03T23:50:40+02:00" level=error msg="<broken file>:1:0Failed to import: Erreur lors de l’ouverture du fichier /home/olivier/.config/nwg-drawer/drawer.css\u00a0: No such file or directory"
time="2022-08-03T23:50:40+02:00" level=warning msg="Undefined icon for "

(nwg-drawer:2624720): Gtk-WARNING **: 23:50:40.370: Found an icon but could not load it. Most likely gdk-pixbuf does not provide SVG support.
time="2022-08-03T23:50:40+02:00" level=info msg="Using XDG user dirs from /home/olivier/.config/user-dirs.dirs"

** (nwg-drawer:2624720): WARNING **: 23:50:40.431: gtk-layer-shell v0.6.0 may not work on GTK v3.24.34. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md
time="2022-08-03T23:50:40+02:00" level=info msg="UI created in 390 ms. Thank you for your patience."
time="2022-08-03T23:50:44+02:00" level=warning msg="Undefined icon for "
time="2022-08-03T23:50:46+02:00" level=warning msg="Undefined icon for "
time="2022-08-03T23:50:46+02:00" level=warning msg="Undefined icon for "
time="2022-08-03T23:51:08+02:00" level=warning msg="Undefined icon for "

I know nothing about NixOS, as well as tor. What wonders me are these lines:
AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files

In my setup, the program just freezes and freezes my entire Sway desktop. If I hit Escape, the nwg-drawer exits and my desktop is back to normal after some time (around 10 s).

Anything wrong w/ your system configuration? Do you have these lines in your sway config file?
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
    dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK

"ERROR: /home/olivier/.config/nwg-drawer/drawer.css css file not found or erroneous. Using GTK styling."

This file should be re-created if missing. You mast have an error inside it.

Anything wrong w/ your system configuration? Do you have these lines in your sway config file?
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
    dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK

I do. But it looks like enabling the service gnome.at-spi2-core made this line disappear for me.

"ERROR: /home/olivier/.config/nwg-drawer/drawer.css css file not found or erroneous. Using GTK styling."

This file should be re-created if missing. You must have an error inside it.

I created this file manually which makes this error also go away. By the way, the installation command make install puts this file in /usr/share/nwg-drawer and not in $XDG_CONFIG_HOME/nwg-drawer like the code seems to expect it.
With these two errors disappeared, I still get the same behavior as before when typing tor.

I'll try to find some time to get a GDB backtrace.

On second thought, I'm not sure I know how to do that, given that when unresponsive, nwg-drawer blocks my entire desktop.

I'm having this issue as well, except with the string "game". Nwg-drawer becomes unresponsive and starts blocking the desktop. The desktop responds to inputs underneath but I have found no other way to fix the issue other than dropping to TTY and killing sway

I've not yet found my string to hang the drawer.
This will probably tell us nothing, but, in case you have 2 outputs, could you:

Open a terminal window on one of them;
pkill -f nwg-drawer;
nwg-drawer -d, then move the mouse pointer quickly to another output, for the drawer to open there;
type your killer phrase;
Check if you see something unusual in the terminal window?

I don't have two monitors unfortunately, but I think I can type in the terminal while the drawer is hanging. Let me try it

So nothing printed on the terminal underneath the drawer while the error was happening, however after spamming mouse clicks, the escape key, and the backspace for about 2 minutes the drawer died and some errors printed in the terminal:

(nwg-drawer:96360): Pango-WARNING **: 02:07:14.751: Invalid UTF-8 string passed to pango_layout_set_text()

(nwg-drawer:96360): Pango-WARNING **: 02:07:14.774: Invalid UTF-8 string passed to pango_layout_set_text()

(nwg-drawer:96360): Pango-WARNING **: 02:07:14.774: Invalid UTF-8 string passed to pango_layout_set_text()

(nwg-drawer:96360): Pango-WARNING **: 02:07:14.774: Invalid UTF-8 string passed to pango_layout_set_text()
^[^[Gdk-Message: 02:07:15.567: Lost connection to Wayland compositor.

Hmmm... No idea why "base" could be an invalid UTF-8 string, but we have at least some little clue.

@OlivierNicole, @zoro11031: what's your $LANG?

$LANG

echo $LANG
en_US.UTF-8

May I see the full locale output?

I do have one custom .desktop file that I made  that appears when I search "game", but it launches fine and doesn't cause issues when I scroll to it without searching so I'm not sure if it's the issue. It's the only unusual condition that's triggering though I think.
This is the contents of it:
#!/usr/bin/env xdg-open
[Desktop Entry]
Comment[en_US]=
Comment=
Exec=bash game2text.sh
GenericName[en_US]=
GenericName=
Icon=/usr/share/icons/game2text.ico
MimeType=
Name[en_US]=game2text
Name=game2text
Path=/home/petergriffin/.local/share/game2text
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application

And here's a video of it happening

May I see the full locale output?

locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

I do have one custom .desktop file

You could change its extension temporarily, to make sure.

locale

Nothing unusual.
It's damned difficult to find a solution to an error that you cannot reproduce. :/

One way or another, we have just 2 culprit candidates: searchEntry or statusLabel.

Unfortunately hiding the desktop file for game2text doesn't seem to have fixed the issue :/

Could you check and show me the content of the .desktop file of the focused item? Probably this one:

Also, to make sure that the error doesn't come from the file search, please check if it still occurs with the -nofs argument.

May I see the full locale output?

❯ locale
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=

@OlivierNicole, OK, thanks. It seems the reason is different. Could you please check which app icon gets focused when the drawer gets stuck, and then show me its .desktop file content? Also check if the drawer hangs if running with the -nofs flag, please.

I think it's the file search. I just tried with and without file search, it freezes with, and freezes without. I do have a second drive connected with a games folder, and a network drive connected that also has a games folder. Could it be possible that trying to parse through those drives is causing the hang?
As a side note, I haven't been able to reproduce the UTF issue in the console logs since the first time I ran it using nwg-drawer -d. This was the output of the last crash:
petergriffin ) nwg-drawer -d
INFO[0000] term: xterm-kitty
INFO[0000] lang: en_US
INFO[0000] Config dir: /home/petergriffin/.config/nwg-drawer
INFO[0000] Found 5 pinned items
INFO[0000] Found 127 desktop files
INFO[0000] Skipped 20 duplicates; 38 .desktop entries hidden by "NoDisplay=true"
INFO[0000] Custom associations file /home/petergriffin/.config/nwg-drawer/preferred-apps.json not found or invalid
INFO[0000] Found 5 search exclusions in /home/petergriffin/.config/nwg-drawer/excluded-dirs
INFO[0000] Preferring dark theme variants
INFO[0000] Using style from /home/petergriffin/.config/nwg-drawer/drawer.css
INFO[0000] Using XDG user dirs from /home/petergriffin/.config/user-dirs.dirs
INFO[0000] UI created in 206 ms. Thank you for your patience.

I do have a second drive connected with a games folder, and a network drive connected that also has a games folder. Could it be possible that trying to parse through those drives is causing the hang?

Only if they're mounted inside your home directory. I see you use excluded-dirs. Try excluding them, and we will see.

No, they're mounted in /mnt. I'll try it anyway when I'm off work just to see

I think it's the file search.

Assuming you're right, I'd like to see the path that causes the failure. I added a line to print them while creating file search results. You'd need to install go, if not yet installed, clone the debu68 branch, cd into it, kill the running nwg-drawer instance, and then run go run . -d. You'll see paths prefixed with "Path: ". Type "game" and see what the last line looks like.
Example (the phrase if "bro", as "game" returns just 1 result on my machine):
$ go run . -d
# github.com/gotk3/gotk3/glib
cgo-gcc-prolog: In function ‘_cgo_200740c87a77_Cfunc_g_binding_get_source’:
cgo-gcc-prolog:71:2: warning: ‘g_binding_get_source’ is deprecated: Use 'g_binding_dup_source' instead [-Wdeprecated-declarations]
In file included from /usr/include/glib-2.0/glib-object.h:24,
                 from /usr/include/glib-2.0/gio/gioenums.h:30,
                 from /usr/include/glib-2.0/gio/giotypes.h:30,
                 from /usr/include/glib-2.0/gio/gio.h:28,
                 from ../../go/pkg/mod/github.com/gotk3/gotk3@v0.6.1/glib/gbinding.go:3:
/usr/include/glib-2.0/gobject/gbinding.h:115:23: note: declared here
  115 | GObject *             g_binding_get_source          (GBinding *binding);
      |                       ^~~~~~~~~~~~~~~~~~~~
cgo-gcc-prolog: In function ‘_cgo_200740c87a77_Cfunc_g_binding_get_target’:
cgo-gcc-prolog:107:2: warning: ‘g_binding_get_target’ is deprecated: Use 'g_binding_dup_target' instead [-Wdeprecated-declarations]
/usr/include/glib-2.0/gobject/gbinding.h:119:23: note: declared here
  119 | GObject *             g_binding_get_target          (GBinding *binding);
      |                       ^~~~~~~~~~~~~~~~~~~~
INFO[0000] term: foot
INFO[0000] lang: pl_PL
INFO[0000] Config dir: /home/piotr/.config/nwg-drawer
INFO[0000] Found 6 pinned items
INFO[0000] Found 212 desktop files
INFO[0000] Skipped 23 duplicates; 58 .desktop entries hidden by "NoDisplay=true"
INFO[0000] Found 6 associations in /home/piotr/.config/nwg-drawer/preferred-apps.json
INFO[0000] /home/piotr/.config/nwg-drawer/excluded-dirs file not found

(nwg-drawer:125109): Gtk-WARNING **: 01:34:07.946: Theme parsing error: gtk.css:1:7: Invalid name of pseudo-class
INFO[0000] Preferring dark theme variants
INFO[0000] Using style from /home/piotr/.config/nwg-drawer/drawer.css
WARN[0000] Undefined icon for River
INFO[0000] Using XDG user dirs from /home/piotr/.config/user-dirs.dirs
INFO[0000] UI created in 268 ms. Thank you for your patience.
DEBU[0001] Path: #is_dir#/home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/01_So Far Away.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/02_Money For Nothing.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/03_Walk Of Life.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/04_Your Latest Trick.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/05_Why Worry.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/06_Ride Across The River.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/07_The Man's Too Strong.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/08_One World.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/09_Brothers In Arms.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/BrothersInArms.m3u
DEBU[0001] Path: /home/piotr/Muzyka/Stachura Marek Galazka/03. Nie brooklinski most.mp3

To kill the hung drawer, you could use a key binding to `pkill -f nwg-drawer".

I think I figured out the culprit, it was game2text but not the desktop entry itself but the Python virtual environment in the application directory. It was being backed up to another folder outside of it's usually home and the drawer was catching it.
Here's a small sample (the logs go on for hundreds of lines)
DEBU[0049] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/osdetect.h
DEBU[0049] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/pageiterator.h
DEBU[0049] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/platform.h
DEBU[0049] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/publictypes.h
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/renderer.h
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/resultiterator.h
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/serialis.h
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/strngs.h
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/tess_version.h
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/tesscallback.h
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/thresholder.h
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/unichar.h
DEBU[0050] Path: #is_dir#/home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/lib
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/lib/libtesseract.4.dylib
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/lib/libtesseract.a
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/lib/libtesseract.dylib
DEBU[0050] Path: #is_dir#/home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/lib/pkgconfig
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/lib/pkgconfig/tesseract.pc
DEBU[0050] Path: #is_dir#/home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share
DEBU[0050] Path: #is_dir#/home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/legacy
DEBU[0050] Path: #is_dir#/home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/legacy/tessdata
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/legacy/tessdata/eng.traineddata
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/legacy/tessdata/jpn.traineddata
DEBU[0050] Path: #is_dir#/home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata
DEBU[0050] Path: #is_dir#/home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/alto
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/ambigs.train
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/api_config
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/bigram
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/box.train
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/box.train.stderr
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/digits
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/get.images
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/hocr
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/inter
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/kannada
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/linebox
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/logfile
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/lstm.train
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/lstmbox
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/lstmdebug
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/makebox
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/pdf
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/quiet
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/rebox
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/strokewidth
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/tsv
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/txt
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/unlv
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/wordstrbox
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/eng.traineddata
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/eng.user-patterns
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/eng.user-words
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/jpn.traineddata
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/jpn_vert.traineddata
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/osd.traineddata
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/pdf.ttf
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/snum.traineddata
DEBU[0050] Path: #is_dir#/home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/tessconfigs
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/tessconfigs/batch
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/tessconfigs/batch.nochop
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/tessconfigs/matdemo
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/tessconfigs/msdemo
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/tessconfigs/nobatch
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/tessconfigs/segdemo

Is it possible to code an upper limit to the amount of paths nwg-drawer will return before stopping the directory search?

Hmm here's something though: I tried excluding the directory in question to see if it still caused issues... and the string is still causing the application to hang

Yes, the directory walk is effective enough to support hundreds of results.
Sorry, for now I have no idea how to fix the issue. I need to reproduce it on my machine first.

No worries, I'm using the -nofs argument right now as a workaround and it works as a temp fix for the issue. I'm okay with using my file browsers search function for everything for now. Thanks for taking a look anyway!

Yeah, but it needs to be resolved. Let me know if some clue appears.

Actually, the other day I ran it without fsmode and it locked up on a string that wasn't "gam". If I remember right it locked when I was trying to type emacs. So it seems the issue is either progressive somehow or there's something in common between both those queries on my system that's locking it. I'll mess around with it later and let you know

Whatever that I can see on my development machine will be of help.

I have the same, my magic word is fir (when trying to start firefox).
I compiled nwd-drawer from the debu68 branch and these are the last log line before it hangs after entering fir:
...
DEBU[0015] Path: /home/varac/.cache/mozilla/firefox/9gu3sl85.default-release/cache2/entries/D96355B993181D9E8F8C026A972A3B91773E832D
DEBU[0015] Path: /home/varac/.cache/mozilla/firefox/9gu3sl85.default-release/cache2/entries/D9652939ED84C93EB9D7328AC447C55D6BCBEA26
DEBU[0015] Path: /home/varac/.cache/mozilla/firefox/9gu3sl85.default-release/cache2/entries/D9655821BF2248235ACFCD6C4EE38AAD7CD727D1
DEBU[0015] Path: /home/varac/.cache/mozilla/firefox/9gu3sl85.default-release/cache2/entries/D973D2A51D7D9C2E4B74A39897A02A50D998C455
DEBU[0015] Path: /home/varac/.cache/mozilla/firefox/9gu3sl85.default-release/cache2/entries/D98090F6782674B0FA69780C73BF1E3B34F1194B
signal: killed

varac@sancho:~/projects/wayland/sway/nwg-drawer$ find /home/varac/.cache/mozilla/firefox/ |wc -l
7992

So maybe it chokes on my 7992 firefox cache files ? Why does it scan that directory in the first place ?

@varac May I see the content of your ~/.config/user-dirs.dirs file?

@varac It shouldn't search it at all. May I see the content of your ~/.config/user-dirs.dirs file?

Sure:
varac@sancho:~/.config$ cat user-dirs.dirs
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/"

When I'm home, I'll prepare another version on this branch, w/ some more debug messages.

I've added a line to see which paths are going to be searched. Should appear prefixed by DEBU[0000] User dirs map: . Show me the output, please.

I've also fixed the userDirsFile path to use the XDG_CONFIG_HOME variable.

Hugh, this might be related: ... home:/home/varac ... videos:/home/varac/ - does this mean it searches my whole homedir on each search ?
❯ go run . -d
# github.com/gotk3/gotk3/glib
cgo-gcc-prolog: In function ‘_cgo_200740c87a77_Cfunc_g_binding_get_source’:
cgo-gcc-prolog:71:2: warning: ‘g_binding_get_source’ is deprecated: Use 'g_binding_dup_source' instead [-Wdeprecated-declarations]
In file included from /usr/include/glib-2.0/glib-object.h:24,
                 from /usr/include/glib-2.0/gio/gioenums.h:30,
                 from /usr/include/glib-2.0/gio/giotypes.h:30,
                 from /usr/include/glib-2.0/gio/gio.h:28,
                 from /home/varac/go/pkg/mod/github.com/gotk3/gotk3@v0.6.1/glib/gbinding.go:3:
/usr/include/glib-2.0/gobject/gbinding.h:115:23: note: declared here
  115 | GObject *             g_binding_get_source          (GBinding *binding);
      |                       ^~~~~~~~~~~~~~~~~~~~
cgo-gcc-prolog: In function ‘_cgo_200740c87a77_Cfunc_g_binding_get_target’:
cgo-gcc-prolog:107:2: warning: ‘g_binding_get_target’ is deprecated: Use 'g_binding_dup_target' instead [-Wdeprecated-declarations]
/usr/include/glib-2.0/gobject/gbinding.h:119:23: note: declared here
  119 | GObject *             g_binding_get_target          (GBinding *binding);
      |                       ^~~~~~~~~~~~~~~~~~~~
INFO[0000] term: xterm-kitty
INFO[0000] lang: en_US
INFO[0000] Config dir: /home/varac/.config/nwg-drawer
INFO[0000] Found 0 pinned items
INFO[0000] Found 64 desktop files
INFO[0000] Skipped 8 duplicates; 7 .desktop entries hidden by "NoDisplay=true"
INFO[0000] /home/varac/.config/nwg-drawer/preferred-apps.json file not found
INFO[0000] Found 1 search exclusions in /home/varac/.config/nwg-drawer/excluded-dirs
INFO[0000] Preferring dark theme variants
INFO[0000] Using style from /home/varac/.config/nwg-drawer/drawer.css
DEBU[0000] userDirsFile found: /home/varac/.config/user-dirs.dirs
INFO[0000] Using XDG user dirs from /home/varac/.config/user-dirs.dirs
DEBU[0000] User dirs map: map[documents:/home/varac/Documents downloads:/home/varac/Downloads home:/home/varac music:/home/varac/Music pictures:/home/varac/Pictures videos:/home/varac/]
INFO[0000] UI created in 110 ms. Thank you for your patience.

I'm using Arch Linux installed 3 days ago.

does this mean it searches my whole homedir on each search ?

It looks like this. And the XDG_VIDEOS_DIR="$HOME/" is the culprit?

Right - I had a symlink for Videos in my homedir. I removed it and re-ran xdg-user-dirs-update, but the content was the same as in https://github.com/nwg-piotr/nwg-drawer/issues/68#issuecomment-1329063909.
I realized that I need to run xdg-user-dirs-update --force in order to adjust a the file with sane directories:
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

With these dirs nwg-drawer works fast and like a charm. Thanks for this project !

Excellent, but does it prevent the drawer from hanging?

Yes it does !

Great! Hope @OlivierNicole and @zoro11031 have the same issue, but it needs to be confirmed.

Sorry for not being more responsive on this issue, I have not found the time recently.
I confirm that the issue no longer appears at https://github.com/nwg-piotr/nwg-drawer/commit/85cc2d78ee724cef0c637e37142fa664d766273b. :smiley:

Thank you, @OlivierNicole. If so, I'll merge the branch soon.

Sorry man, I've been busy with finals over here as well and haven't had a chance to look. I can give the new branch a try tonight if you still need testing for it

@zoro11031 I'm merging one way or another. Let me know if still misbehaves on your side.

Just tried it out, just wanted to confirm that it fixed the behavior for me as well. Thanks as always for being so responsive and quick to update


dirtyPayload infinite loop problem

I think I might find the infinite loop problem you talked about in https://github.com/wechaty/puppet-wechat/issues/177. I think it's a puppet issue so I post it here.
Let's take a look at this example and see how it goes.
bot.Contact.find({name: xxx}).phone(['+8612345678'])
Wechaty ContactMixin phone()
await this.wechaty.puppet.contactPhone(this.id, phoneList)
await this.wechaty.puppet.contactPayloadDirty(this.id)

Wechaty Puppet ContactMixin contactPayloadDirty()
await this.__dirtyPayloadAwait(
  PayloadType.Contact,
  id,
)

Puppet Server will emit a dirty event and resolve the above await. Everything seems alright so far, but here:
Wechaty PuppetMixin __setupPuppetEvents()
puppet.on('dirty', async ({ payloadType, payloadId }) => {
  try {
    switch (payloadType) {
      case PUPPET.types.Payload.RoomMember:
      case PUPPET.types.Payload.Contact:
        await (await this.Contact.find({ id: payloadId }))?.sync()
        break
...

Wechaty Contact sync()
await this.ready(true)

Wechaty Contact ready()
if (forceSync) {
  await this.wechaty.puppet.contactPayloadDirty(this.id)
}

Here we go, we go back to Wechaty Puppet ContactMixin contactPayloadDirty()
Originally posted by @hcfw007 in https://github.com/wechaty/puppet/issues/158#issuecomment-1061539832

I currently considered two potential solutions:

Make dirty event oriented from __dirtyPayloadAwait different from those triggered by puppet-implementation. (e.g. 'dirty-response')

Add a pool in onDirty handler, so that all dirty events started from __dirtyPayloadAwait will be dismissed.


unsafe.Pointer = 0xffffffff considered success

I found this: https://github.com/iovisor/bcc/issues/1754.
It made me wonder why my program did not fail, even though I do check all errors.
In the logs I found:
May 11 20:42:50 36com209 prometheus-ebpf-exporter[31829]: cannot attach kprobe, probe entry may not exist

Relevant block of code from bcc:
      if (errno == ENOENT)
         fprintf(stderr, "cannot attach kprobe, probe entry may not exist\n");
      else
         fprintf(stderr, "cannot attach kprobe, %s\n", strerror(errno));
      close(kfd);
      goto error;

And error label:
error:
  bpf_close_perf_event_fd(pfd);
  return -1;

In go this propagates into Module::attachProbe:
func (bpf *Module) attachProbe(evName string, attachType uint32, fnName string, fd int) error {
	if _, ok := bpf.kprobes[evName]; ok {
		return nil
	}

	evNameCS := C.CString(evName)
	fnNameCS := C.CString(fnName)
	res, err := C.bpf_attach_kprobe(C.int(fd), attachType, evNameCS, fnNameCS, -1, 0, -1, nil, nil)
	C.free(unsafe.Pointer(evNameCS))
	C.free(unsafe.Pointer(fnNameCS))

	if res == nil {
		return fmt.Errorf("failed to attach BPF kprobe: %v", err)
	}
	bpf.kprobes[evName] = res
	return nil
}

Here res == nil check never works, because we get unsafe.Pointer(0xffffffff), which is -1.
Consumers get error in stderr from bcc, but no actual error.
I've tried fixing it, but my arm64 build requires bcc from the tip, where APIs already changed:
:~/ebpf_exporter$ go install -v github.com/cloudflare/ebpf_exporter/...
github.com/cloudflare/ebpf_exporter/vendor/github.com/iovisor/gobpf/bcc
# github.com/cloudflare/ebpf_exporter/vendor/github.com/iovisor/gobpf/bcc
src/github.com/cloudflare/ebpf_exporter/vendor/github.com/iovisor/gobpf/bcc/module.go:196: too many arguments in call to _C2func_bpf_attach_kprobe
	have (_Ctype_int, uint32, *_Ctype_char, *_Ctype_char, number, number, number, nil, nil)
	want (_Ctype_int, uint32, *_Ctype_char, *_Ctype_char)
src/github.com/cloudflare/ebpf_exporter/vendor/github.com/iovisor/gobpf/bcc/module.go:202: cannot convert nil to type _Ctype_int
src/github.com/cloudflare/ebpf_exporter/vendor/github.com/iovisor/gobpf/bcc/module.go:205: cannot use res (type _Ctype_int) as type unsafe.Pointer in assignment
src/github.com/cloudflare/ebpf_exporter/vendor/github.com/iovisor/gobpf/bcc/module.go:212: too many arguments in call to _C2func_bpf_attach_uprobe
	have (_Ctype_int, uint32, *_Ctype_char, *_Ctype_char, _Ctype_ulong, _Ctype_int, number, number, nil, nil)
	want (_Ctype_int, uint32, *_Ctype_char, *_Ctype_char, _Ctype_ulong, _Ctype_int)
src/github.com/cloudflare/ebpf_exporter/vendor/github.com/iovisor/gobpf/bcc/module.go:216: cannot convert nil to type _Ctype_int
src/github.com/cloudflare/ebpf_exporter/vendor/github.com/iovisor/gobpf/bcc/module.go:219: cannot use res (type _Ctype_int) as type unsafe.Pointer in assignment

Good news is that we no longer need to pass useless arguments. Bad news we have to make it compile now. I'm not a C programmer and don't know how to make it work seamlessly.
I've asked for a new release from bcc too: https://github.com/iovisor/bcc/issues/1740.

I'm also seeing these errors on a fresh Linux ubuntu-artful 4.13.0-31-generic VM where I ran:
sudo apt-get install bcc-tools libbcc-examples linux-headers-$(uname -r)

and then tried to get gobpf and all dependencies:
  gobpf git:(master) go get ./...
# github.com/iovisor/gobpf/bcc
bcc/module.go:212: too many arguments in call to _C2func_bpf_attach_kprobe
        have (_Ctype_int, uint32, *_Ctype_char, *_Ctype_char, number, number, number, nil, nil)
        want (_Ctype_int, uint32, *_Ctype_char, *_Ctype_char)
bcc/module.go:216: cannot convert nil to type _Ctype_int
bcc/module.go:219: cannot use res (type _Ctype_int) as type unsafe.Pointer in assignment
bcc/module.go:226: too many arguments in call to _C2func_bpf_attach_uprobe
        have (_Ctype_int, uint32, *_Ctype_char, *_Ctype_char, _Ctype_ulong, _Ctype_int, number, number, nil, nil)
        want (_Ctype_int, uint32, *_Ctype_char, *_Ctype_char, _Ctype_ulong, _Ctype_int)
bcc/module.go:230: cannot convert nil to type _Ctype_int
bcc/module.go:233: cannot use res (type _Ctype_int) as type unsafe.Pointer in assignment
bcc/module.go:266: too many arguments in call to _C2func_bpf_attach_tracepoint
        have (_Ctype_int, *_Ctype_char, *_Ctype_char, number, number, number, nil, nil)
        want (_Ctype_int, *_Ctype_char, *_Ctype_char)
bcc/module.go:271: cannot convert nil to type _Ctype_int
bcc/module.go:274: cannot use res (type _Ctype_int) as type unsafe.Pointer in assignment

Is this just a matter of waiting for a new bcc release?

This should be fixed with #130.