227,599 questions
0
votes
0
answers
71
views
How to select particular queue for sending IO from Userspace in linux nvme driver
I am customizing the linux nvme driver to take QID and submit the IO command to that particular QID in the ioctl command NVME_IOCTL_SUBMIT_IO. I am using Kernel6.5(ubuntu 22).
The call is like this:
...
0
votes
0
answers
44
views
Open file with Vim, but limit the number of read lines / chars [duplicate]
Vim often hangs or is slow when opening a really large file (many lines, or many chars in a line)
I found a workaround (but for viewing only):
head -n 1000 mylargefile.txt | vim -
head -c 1000 ...
1
vote
0
answers
203
views
python-dotenv not loading .env variable for API_KEY, but other variables load fine when override
I'm working on a FastAPI project where I use python-dotenv to load environment variables from a .env file. Most variables load correctly, but the API_KEY variable is not being picked up by my app, ...
3
votes
0
answers
143
views
Python service memory leaks on Ubuntu at scale
I have a python based service that uses libraries such as requests or curl-cffi to fetch the content of our webpages which we currently are testing for scale.
As the expected response is the content ...
0
votes
1
answer
113
views
Why does PERF_COUNT_HW_REF_CPU_CYCLES have much higher variance on Zen5 cpus than PERF_COUNT_HW_CPU_CYCLES?
My understanding is that PERF_COUNT_HW_REF_CPU_CYCLES should map to some counter that counts at a constant rate, as opposed to PERF_COUNT_HW_CPU_CYCLES which is affected by frequency scaling. I'd ...
3
votes
1
answer
101
views
Why is the message arrived callback function triggered twice?
issue
When I was designing the MQTT client using the Paho MQTT C library, why is the message arrived callback set using MQTTAsync_setCallbacks invoked twice?
I am using the asynchronous mode of the ...
1
vote
0
answers
105
views
How to use DDD for debugging programs created by CLANG/LLVM
I am using clang on a linux environment to compile a C program. When trying to debug the executable using ddd, it does not find the debug symbols (yes, they are included). When I use gcc instead of ...
2
votes
1
answer
66
views
Can you test video calling on the same computer but different browsers
So i was building a Video calling app with nodejs and react and WebRTC, and wanted to test it at some point but whenever on user accepts the call the other user gets this error message ...
3
votes
1
answer
132
views
How can I read environment variables in the early stages?
Use LD_PRELOAD to load shared objects with the initfirst flag. Calling the getenv() function from a function with __attribute__((constructor)) returns NULL. I think this is probably because the ...
0
votes
1
answer
148
views
How to run WSL bash functions from CMD
In Windows cmd you can run wsl commands just by typing:
> wsl pwd
/mnt/c/Users/user/
But when I try to run functions that are stored in ~/.bashrc file, nothing is happening:
> wsl test
>
...
2
votes
1
answer
148
views
Linux: Low-level management of virtual memory - collaboration between processes
If I were to mmap() a very large file (for read-only access) pages would be read-in, by the kernel, after a page fault indicates that the page is not already cached in RAM. Pages will remain cached ...
1
vote
1
answer
55
views
Failed to run netlink API in docker
Can anyone help me address the problem why Connection Refused happen when I run the program in docker container? If I set --net=host --privileged when running docker container, it works, otherwise ...
0
votes
0
answers
102
views
C++ SFML window created from X11 handle says "not responding" despite running fine, and polling for events on Linux
so my problem is that when I create a X11 window and then create a SFML window from the X window handle, the os says the window is "not responding" even though I am polling for events and ...
-1
votes
1
answer
65
views
How do I clear the cache in Pentaho Data Integration? [closed]
How do you clear the cache for Pentaho in a Linux environment? Is there a particular file I need to delete somewhere?
1
vote
1
answer
91
views
How can I disable middle-click paste in a Java Swing application?
I am using the middle mouse button for an autoscroller in a Java Swing application. However, when I middle-click on a text component, on Linux it pastes the last selected text, which is unwanted. How ...
-1
votes
1
answer
48
views
Not able to connect to remote linux server using VScode
When I click on Connect to Remote Server in VScode, it throws this error:
wget download failed vscode-cli-<commit>.tar.gz: Disk quota exceeded
scp: dest open "...": Failure
0
votes
0
answers
86
views
glibc build error: `syslog` function not inlinable
I am trying to bulid glibc from source at Ubuntu 18.04
GLIBC_VERSION="2.28"
GLIBC_DIR="$HOME/.local/src/opt/glibc-$GLIBC_VERSION"
GLIBC_TAR="$HOME/.local/src/opt/glibc-$...
0
votes
0
answers
49
views
how to compile a C program in nsjail?
I am trying to compile a hello world c program using gcc using the following nsjail command -
sudo nsjail -B / --cwd /mydir -- /usr/bin/gcc main.c
I know, extremely naive and insecure way of ...
0
votes
1
answer
63
views
non-blocking `accept` return `EAGAIN` on connection burst
I observed weird behavior when performing non-blocking accept loop. When there are multiple connection requests in the queue, only the first accept attempt succeed. All subsequent attempt fail with ...
0
votes
0
answers
57
views
Error only on linux: Attribute 'proxyBeanMethods' in @TestConfiguration is declared as an @AliasFor nonexistent attribute
I'm trying to run a Cucumber BDD SpringBoot test application with these versions using JDK17 (Java 17):
springboot: 3.2.11
springboot-framework: 6.1.4
cucumber: 7.23.0
Spring dependencies used:
...
1
vote
1
answer
45
views
Run Python-based service via crontab
I have a number of Python-based services on a Linux server that I start by running a .py file via a python3 bash command and that are supposed keep running indefinitely. One is a flask app, another is ...
3
votes
1
answer
93
views
Does C# .NET AES GenerateKey (RandomNumberGenerator) truly use /dev/urandom on Linux
Generating a key and I have tried to understand how GenerateKey gets random in Linux.
Example:
using System;
using System.Security.Cryptography;
namespace AesEncryption
{
class Program
{
...
2
votes
1
answer
64
views
C# on Linux searches current directory with Process.Start?
I was writing a simple program to wrap some common git calls for me. My target platform is Linux and I am expecting normal Linux search behavior for starting processes (e.g. do not search the current ...
0
votes
0
answers
110
views
Linux - is it possible to use fanotify to monitor whole filesystem for file create events?
I'm looking for a way to monitor the entire filesystem on a Linux (Ubuntu) system for specifically create events using the fanotify library. Essentially, every time a file gets created anywhere, I ...
0
votes
1
answer
106
views
virt_to_phys vs dma_map_single in smmu enable system
can someone please help in explaining why virt_to_phys cant be used in case of SMMU to get the IOVA address, as in SMMU enabled system physical address are not exposed , so can we use virt_to_phys in ...