If the system is currently loading-up and populating
data and the user quits then it was crashing because
of a call to a deleted ProcessCoordinator object.
This change implements the reference as BReference
ensuring that the ProcessCoordinator object is only
deleted after it is not used anywhere.
Resolves#16109
Change-Id: If535c151819da37d502283af3745e4148da69026
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2797
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This fixes a SEGFAULT in the tcp add-on reported in issue #15952. See
that issue for some analysis.
The short version is that, when closing a session over the loopback
interface, there is a special branch which skips the TIME_WAIT state
and instead just releases the socket while handling a RST/ACK
segment. If the timing is right this can lead to the reference
counts becoming imbalanced, leading to the code in tcp_receive_data
segfaulting when it tries to release the reference it acquired from
EndpointManager::FindConnection.
I can't find any other systems which skip the TIME_WAIT state with
loopback sessions, and I'm not entirely certain that it's a totally
safe thing to do anyway. This patch instead just treats local sessions
the same way it does a remote session and uses the TIME_WAIT state.
Any workload which creates and discards lots of ephemeral sockets can
just use SO_REUSEADDR to handle this situation like any other system.
To add a final bit of safety, the only place where a net_socket can be
used after calling gSocketModule->release_socket(net_socket*) is in
tcp_receive_data(). release_socket() returns true if the reference
count falls to zero, deleting the socket. There was an unused segment
action flag DELETE_ENDPOINT that I renamed to DELETED_ENDPOINT, which
is used by tcp_receive_data to know whether its safe to release its
reference to the socket after calling TCPEndpoint::SegmentReceived().
Change-Id: I2652fb225c3c8419234cfd627f74ff2de8402003
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2793
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Fixes#15982.
Added font to UnicodeBlockView. Cache Unicode "Blocks" for both
UnicodeBlockView and CharacterView. Added lookup of non-Be Unicode blocks
(i.e. blocks with 'kNoBlock' specified). Gray out non-found blocks.
NOTE: tested fontconfig extensively in another environment and the shown
blocks match what fontconfig returns. However, you may sometimes see
characters in blocks that aren't 'included' in a font. I haven't figured
out why that occurs.
Change-Id: Ia3c7f8ccc6dc43c5ce062ed002846c861a8fa223
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2739
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
In single package mode there was a crash owing to the
status bar not being present. This may as well be
added because it provides some feedback that the
application is actually doing something. The
behaviour of this is not ideal because the feedback
could be better, but it will resolve the crash
issue this ticket is raising.
Resolves#15964
Change-Id: I603a7b163139859f0c46a35ead0809e5d82e0f8d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2791
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This class can potentially be accessed by multiple "tabs" (windows)
at once, so it must be read/write locked to account for that.
Fixes#16027.
Change-Id: I9cc741874caed4997497b03c8893bc2acb0e6fe7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2779
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Each TCPEndpoint has two BufferQueue members, one for the send queue
and one for the receive queue.
If DEBUG_BUFFER_QUEUE is enabled, then most methods of BufferQueue
call BufferQueue::Verify(), sometimes twice. This member function
performs some sanity checking which requires iterating through every
net_buffer in the queue.
Disabling this in a debug build improved throughput by a factor of 5x
over the loopback interface on my laptop. Using iperf the measured
throughput went from 900Mbps to around 4.8Gbps.
This patch turns this sanity checking off for release builds.
* Rename DEBUG_BUFFER_QUEUE to DEBUG_TCP_BUFFER_QUEUE
* Change the default in BufferQueue.h to disabled
* Set DEBUG_TCP_BUFFER_QUEUE to KDEBUG_LEVEL_2 in
kernel_debug_config.h
Change-Id: I262dac5d7e2889d2942bbdcf6b667cc0cbafa4c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2780
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Our sniffing rule is not perfect, but it is already a lot better than
what was done here.
Partially fixes#14437 (the icons also fails parsing for other reasons,
but with an error message, at least)
Change-Id: I25475b419b5fbe863c71f553a336757d7950bf48
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2662
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The parser was based on an old example from agg. NanoSVG is originally
based on the same code, but has lots of bugfixes. So it makes sense
to use it.
Nanosvg revision 25241c5a8f8451d41ab1b02ab2d865b01600d949
Fixes#5955, #8586, #13021.
Change-Id: I38ff9aa4e1d403c41979ebe42f7b45d4500a870c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2661
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This change removes two mistakes I made a long time ago
that caused unnecessarily copying of lists of data. This
fix speeds up the UI alot.
This change also clears data in UI list elements when a
bulk load is requested. It stops clearing otherwise and
instead uses "add" and "remove" operations in the lists
which is OK now because the UI list elements are much
faster than they have been in the past. This removes
the strange clean-and-reload that was visible in the UI
previously.
A threaded package loading system was put in place a long
time ago, but with these performance improvements this
mechanism is no longer necessary; it has been removed to
simplify the code.
Fixes#16012
Change-Id: I393cee929695726539602b51630ae285fb8384f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2748
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
The local storage of the various repositories' config
needs to cater for different generations of storage
formats and also needs to be able to swap out legacy
repository identifiers.
Change-Id: Ib4b3857254b7b703858eff6815e2d6c54d69da3c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1963
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Actually check that the replacement font contains the needed glyph.
Change-Id: I6d774361fcf16a36dc3d05ce8b0fe1cb407fabff
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2767
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Change-Id: I8b8d3a2f3b5a09063b183dc355407908cc2640f6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2763
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
_user_read_link: don't write after the buffer end, anytime the buffer is too
short. It should honor the user bufferSize, instead of using the link length.
normalize_path: null-terminates when bufferSize is lower than B_PATH_NAME_LENGTH.
Change-Id: If3892dc1ffc4aa7a79a333bbe607449ca409a7f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2752
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
like ACPICA does by default. should help with #16055.
Change-Id: I2379d99ecda93007b0dd316b3c94eb1a36ccd7e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2740
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
libnvme can break up transfers that are too large, but to do so,
it allocates one nvme_request struct (of which it has a large,
but finite, pool) per segment. Since we are already iterating
over "vecs", we might as well cut off transfers after they
would otherwise go over the limit.
Individual IOVs that are too large are left alone, though;
libnvme can still handle this. But at least we no longer try
to do all I/O in one go.
Tested in a similar manner to the previous commit.
The "offset" parameter was not actually an IOV offset, but actually
a byte offset across all IOVs... whoops. Somehow, this went unnoticed
as most controllers have large enough maximum transfer sizes
that we would in practice not hit the limit (even with bs=1M
dd tests!)
KapiX's controller, as seen in #16049, however, has a maximum
transfer size of 64 pages; much smaller than these other controllers,
so it did trigger this behavior and exposed the bug.
Tested by adding an artificial limit of 2 blocks as the max
transfer size (which makes things pretty slow, as you might
expect.)
Now file system can be mounted sucessfully.
Adding documentation for using the code.
Change-Id: I2bd1b72e06ffc3b5f6306aaa69c59becf4cb882b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2696
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This change will move the display of the featured packages
from a dynamic layout to one that is static. This should
improve layout consistency and ui performance as well as
introduce keyboard navigation in the featured packages
list.
Resolves#11675, #15012
Helps #14675
Change-Id: Iddac7a9562763c7a890ec5dcf633e94f84684f43
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2708
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
I added this function to make the queued requests logic more robust,
but I failed to notice that since it is called from nvme_qpair_submit_request,
it would just result in a deadlock of any qpair that had requests
queued.
May help with some of the "qpair lockup" tickets.
Change-Id: I5ff63b509ae8812356d0d33f019027d3159b6685
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2735
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This adds support for the 9xxx series of devices.
Change-Id: I43385e91b91201732397b79c38bd9bb4f3a18f1b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2733
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
We do not need to go through all the overhead of mutex_lock_with_timeout()
if there is in fact no timeout.
Change-Id: I7891ae9138a7d45be934ac53412b82546d52b901
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2730
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The window may be gone (if its B_QUIT_REQUESTED was called before the
main Deskbar window one), so we can't safely call Quit() on it. Instead,
just send a B_QUIT_REQUESTED through the BMessenger, which is a bit
safer.
Should fix#16026.
Change-Id: I4c99c3a7f994044c3c3f0c08b35ae451c3ff9ea7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2721
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
APE reader was using a GPL licensed version of MD5. A similar
implementation in the public domain was available in libnetapi, which I
moved to libshared so the APE reader can use it (and made some fixes,
missing const mainly). It only needs a small wrapper to use it easily
from C++ in a way compatible with the previous implementation.
Part of #13814.