Seems I forgot to announce that the linux_base-c6 is in the Ports Collection now. Well, it is not a replacement for the current default linux base, the linuxulator infrastructure ports are missing and we need to check if the kernel supports enough of 2.6.18 that nothing breaks.
TODO:
To my knowledge, nobody is working on anything of this. Anyone is welcome to have a look and provide patches.
GD Star Rating
loading…
GD Star Rating
loading…
Tags: c6,
current,
infrastructure,
kernel,
linux,
patches,
ports,
rpms —
Today I had again some energy to look at why mono fails to build on FreeBSD-current.
I decided to do a debug-build of mono. This did not work initially, I had to produce some patches.
Does this mean nobody is doing debug builds of mono on FreeBSD?
I have to say, this experience with lang/mono is completely unsatisfying.
Ok, bottom line, either the debug build seems to prevent a race condition in most cases (I had a lot less lockups for each of the two builds I did).
Whatever it is, I do not care ATM (if the configure stuff is looking at the architecture of the system, it may be the case that the i386-portbld-freebsdX does not enable some important stuff which would be enabled when run with i486-portbld-freebsdX or better). Here are the patches I used in case someone is interested (warning, copy&paste converted tabs to spaces, you also have to apply the map.c (a generated file… maybe a touch of the right file would allow to apply this patch in the normal patch stage) related stuff when the build fails, else there is some parser error in mono):
--- mcs/class/Mono.Posix/Mono.Unix/UnixProcess.cs.orig 2010-01-29 11:34:00.592323482 +0100
+++ mcs/class/Mono.Posix/Mono.Unix/UnixProcess.cs 2010-01-29 11:34:18.540607357 +0100
@@ -57,7 +57,7 @@ namespace Mono.Unix {
int r = Native.Syscall.waitpid (pid, out status,
Native.WaitOptions.WNOHANG | Native.WaitOptions.WUNTRACED);
UnixMarshal.ThrowExceptionForLastErrorIf (r);
- return r;
+ return status;
}
public int ExitCode {
--- mono/io-layer/processes.c.orig 2010-01-29 11:36:08.904331535 +0100
+++ mono/io-layer/processes.c 2010-01-29 11:42:21.819159544 +0100
@@ -160,7 +160,7 @@ static gboolean waitfor_pid (gpointer te
ret = waitpid (process->id, &status, WNOHANG);
} while (errno == EINTR);
- if (ret <= 0) {
+ if (ret == 0 || (ret < 0 && errno != ECHILD)) {
/* Process not ready for wait */
#ifdef DEBUG
g_message ("%s: Process %d not ready for waiting for: %s",
@@ -169,6 +169,17 @@ static gboolean waitfor_pid (gpointer te
return (FALSE);
}
+
+ if (ret < 0 && errno == ECHILD) {
+#ifdef DEBUG
+ g_message ("%s: Process %d does not exist (anymore)", __func__,
+ process->id);
+#endif
+ /* Faking the return status. I do not know if it is correct
+ * to assume a successful exit.
+ */
+ status = 0;
+ }
#ifdef DEBUG
g_message ("%s: Process %d finished", __func__, ret);
--- mono/metadata/mempool.c.orig 2010-01-29 11:58:16.871052861 +0100
+++ mono/metadata/mempool.c 2010-01-29 12:30:45.143367454 +0100
@@ -212,12 +212,14 @@ mono_backtrace (int size)
EnterCriticalSection (&mempool_tracing_lock);
g_print ("Allocating %d bytesn", size);
+#if defined(HAVE_BACKTRACE_SYMBOLS)
symbols = backtrace (array, BACKTRACE_DEPTH);
names = backtrace_symbols (array, symbols);
for (i = 1; i < symbols; ++i) {
g_print ("t%sn", names [i]);
}
free (names);
+#endif
LeaveCriticalSection (&mempool_tracing_lock);
}
--- mono/metadata/metadata.c.orig 2010-01-29 11:59:38.552316989 +0100
+++ mono/metadata/metadata.c 2010-01-29 12:00:43.957337476 +0100
@@ -3673,12 +3673,16 @@ mono_backtrace (int limit)
void *array[limit];
char **names;
int i;
+#if defined(HAVE_BACKTRACE_SYMBOLS)
backtrace (array, limit);
names = backtrace_symbols (array, limit);
for (i =0; i < limit; ++i) {
g_print ("t%sn", names [i]);
}
g_free (names);
+#else
+ g_print ("No backtrace available.n");
+#endif
}
#endif
--- support/map.c.orig 2010-01-29 12:05:22.374653708 +0100
+++ support/map.c 2010-01-29 12:10:29.024412452 +0100
@@ -216,7 +216,7 @@
#define _cnm_dump(to_t, from) do {} while (0)
#endif /* def _CNM_DUMP */
-#ifdef DEBUG
+#if defined(DEBUG) && !defined(__FreeBSD__)
#define _cnm_return_val_if_overflow(to_t,from,val) G_STMT_START {
int uns = _cnm_integral_type_is_unsigned (to_t);
gint64 min = (gint64) _cnm_integral_type_min (to_t);
GD Star Rating
loading…
GD Star Rating
loading…
Tags: amp,
atm,
bottom line,
debugging,
lt,
parser error,
patches,
pid,
posix,
public int —
During the last weeks I identified 64 patches for ZFS which are in 8–stable but not in 7-stable. For 56 of them I had a deeper look and most of them are commited now to 7-stable. The ones of those 56 which I did not commit are not applicable to 7-stable (infrastructure differences between 8 and 7).
Unfortunately this did not solve the stability problems I have on a 7–stable system.
I also committed a diff reduction (between 8-stable and 7-stable) patch which also fixed some not so harmless mismerges (mem-leak and initializing the same mutex twice at different places). No idea yet if it helps in my case.
I also want to merge the new arc reclaim logic from head to 8-stable and 7-stable. Maybe I can do this tomorrow.
Currently I run a test with a kernel where the shared locks for ZFS are switched to exclusive locks.
GD Star Rating
loading…
GD Star Rating
loading…
Tags: arc,
different places,
infrastructure differences,
kernel,
locks,
mutex,
patches,
stability problems,
stable infrastructure,
stable system —
I am impressed. Yes, really. It seems tarsnap DTRT.
I made a test with tarsnap. I made a backup of some data (a full backup of everything is kept on a ZFS volume on an external disk which is only attached to make a full backup once in a while) of one of my systems. This data is 1.1 GB in size (most of it is /usr/src checked out via subversion and extended with some patches — no music, pictures or other such data). This compresses down to 325 MB. Of this 325 MB of data only 242 MB is stored encrypted on the tarsnap server (automatic de-duplication on the backup client). The second backup of the same data in the following night (again 1.1 GB in total, 325 MB compressed) caused 216 kB of new data to be stored on the tarsnap server (again, de-duplication on the client). What I have now are two full off-site backups of this data (two archives with 1.1 GB of data after decompression), with the benefit that the additional storage space required is the storage space of an incremental backup.
The cost (in dollar) of this so far is 0.074603634 for the initial transfer of the data, 0.00242067783 for the data storage on the first day, plus 0.0019572486 for the transfer for the second backup. From the initial 29.93 I still have 29.85 (rounded) left. If I factor out the initial transfer and assuming that the rate of change for this system stays constant, this comes down to 0.01 (rounded-up) per day for this system (or about 8 years of backup if I do not add more systems and do not add more than the initial 29.93 (= EUR 20) — and the price of this service does not increase, off course). Is this data worth 1 cent per day for me? Yes, for sure! Even more, but hey, you did not read this here.
That is what you get when a person designs a service which he is willing to use himself for a price he wants to pay himself (while still not lose money with the service).
Colin, again, I am impressed. Big thumbs up for you!
Now I just have to add some more systems (/etc and similar of various jails… and of course the data of this blog) and polish my tarsnap script for “periodic daily” .
P.S.: Yes there are also places to improve, I found already some things (the config file parser is a little bit strict what it accepts, and some things should be more documented) but Colin is responsive and open to improvement suggestions.
GD Star Rating
loading…
GD Star Rating
loading…
Tags: 8 years,
backups,
compresses,
data storage,
decompression,
incremental backup,
initial transfer,
patches,
storage space,
subversion —
I managed to get some time to setup an automated generation of the doxygen docs for kernel subsystems of FreeBSD on my webserver.
Every night/morning (German timezone) the sources will be updated, and the docs get regenerated (this takes some time). Currently this depends upon some patches to the makefile and doxygen config files in tools/kerneldoc/subsys. Everything is generated directly in the place where the webserver will look for to deliver the pages, so if you browse this in the middle of the generation, the content may not be consistent (yet).
Please be nice to the webserver and do not mirror this. You can generate this yourself very easy. Assuming you have the FreeBSD source on a local hard disk, you just need to download the patch from http://www.Leidinger.net/FreeBSD/current-patches/ (if you do not find dox.diff, update your FreeBSD sources and everything will be OK), apply the patch, cd into tools/kerneldoc/subsys and run “make all” (or “make vm” or whatever you are interested in). You need doxygen installed, off course.
If you want to setup something like this yourself, just download the script which is doing all the work, change some variables in the beginning, and create your own local version of the complete docs.
In case this is using significant traffic, I will ask core/admins if there is the possibility to host it on FreeBSD.org resources.
GD Star Rating
loading…
GD Star Rating
loading…
Tags: admins,
config files,
doxygen,
freebsd kernel,
freebsd sources,
hard disk,
makefile,
patch cd,
patches,
subsystems —