Verity Multilanguage Locale Not Stemming

I am not able to get stemming to work with my collections
that are in unicode. Everything else seems fine but whenever I
search on something like choice, it only returns choice and not
choices as well. I redid the collections using englishx and the
stemming worked but unfortunately there are display issues then,
black diamond with question mark, and my content is in multiple
languages (spanish, french, swedish, english, etc.) so it would be
better to have the stemming in multiple languages.
Does anyone know what sort of problem this could be?
Configuration or installation issue is my guess but I have no idea
where to start.
Oh btw I am running redhat enterprise and using a simple
query in cfsearch.
Thanks,
jt

A footnote to this.
Ken & the guys from Adobe came back to me after my last
comment, and did a bit of a turn around. Ken's helped me through
this with sample code and some pointers in the right direction to
assist me to utilise LUCENE's Russian-stemming capabilities (which
I can confirm do actually work!), as a "pre-processor" which
tokenises documents before Verity indexes them, and then does the
same thing to search strings before passing them to Verity. This
works OK, and is a workable band-aid to the situation.
My next move is to factor Verity out of the equation (and, I
hasten to add, any FUTURE equation involving searching - Russian or
otherwise), and produce a pure Lucene solution.
Thanks Ken and Skip for helping us out on this issue. It's
restored my faith in Adobe.
Cheers.
Adam

Similar Messages

  • IPod Classic 160GB film library sync problem -  trying to sync films that have converted from purchased DVD to mp4 format locally, not purchases from the online store - all other libraries sync perfect - why?

    Hello Apple and the iTunes Windows PC users community.
    I am trying to sync films that I have converted from purchased DVD to mp4 format locally, not purchases from the online store. The mp4s all appear and play successfully in my iTunes application but will not sync across to the iPod film library folder.
    For your information: I am using iTunes 11.1.3.8 on a Windows 7 64bit machine with 500GB hard disk and 8GB of Ram in the UK.
    I have restored the iPod classic 160GB three times now to see if it was a hardware problem with no joy. Each time all the music restores properly as do the podcasts and all the items in TV programmes all appear to sync and work fine.
    I have also tried to copy films into the TV Programmes to get around it with no joy. They always go to the films section to start with. It is just the Films library that does not sync - all others work perfectly. As a last resort I have uninstalled and re-installed iTunes with no joy either.
    I am technically savvy and have gone through the itunes and ipod settings but nothing appears to make a difference - This is the first time I have had to post here as I can usually solve the majority of the ipod anomilies but this one has me flummoxed.
    Has the film encoding type changed in the newest itunes update? - Has this happened to anybody else and is it a hardware, software, or operating system problem.

    Having uninstalled the current version 11.1.3.8 and loaded and older version of iTunes 10.7.0.21 I can now categorically confirm that the newest update seems to be causing the problem as the films and TV Programmes are syncing perfectly on this older version.
    If you are going to do this please dont forget to remove the  ' iTunes Library.itl' file as this stops the older versions from running as I've just found out

  • Is there a way to move Messages and Local (not synced with iCloud) notes from old iPhone to new one ?

    Is there a way to move Messages and Local (not synced with iCloud) notes from old iPhone to new one ?

    Yes, it will. You cannot merge information on the phone. If you want the old messages, you will need to restore from a backup of the old phone, which will make the new phone look just like the old phone. If you want to save the messages from the new phone, you will not be able to get the messages from the old phone.

  • Locale not supported by Xlib

    When I try to run some programs, they warn that the locale is not supported by Xlib. The ones that warn me, can't get correct input from my keyboard, especially characters like é, ã, â, etc.
    Here are some outputs:
    $ urxvt
    urxvt: the locale is not supported by Xlib, continuing without locale support.
    $ xterm
    Warning: locale not supported by Xlib, locale set to C
    Warning: X locale modifiers not supported, using default
    xterm: Failed to open input method
    $ cat /etc/locale.conf
    LANG=en_US.utf8
    LC_COLLATE=C
    $ grep -v '^#' /etc/locale.gen
    en_US.UTF-8 UTF-8
    $ locale
    LANG=en_US.utf8
    LC_CTYPE="en_US.utf8"
    LC_NUMERIC="en_US.utf8"
    LC_TIME="en_US.utf8"
    LC_COLLATE=C
    LC_MONETARY="en_US.utf8"
    LC_MESSAGES="en_US.utf8"
    LC_PAPER="en_US.utf8"
    LC_NAME="en_US.utf8"
    LC_ADDRESS="en_US.utf8"
    LC_TELEPHONE="en_US.utf8"
    LC_MEASUREMENT="en_US.utf8"
    LC_IDENTIFICATION="en_US.utf8"
    LC_ALL=
    $ locale -a
    C
    POSIX
    en_US.utf8

    $ cat /etc/locale.conf
    LANG=en_US.utf8
    LC_COLLATE=C
    You forgot the dash.  Caps might matter as well.  I have:
    $ cat /etc/locale.conf
    LANG=en_US.UTF-8
    You could also try running "locale-gen" as root and here's a wiki article about how to correctly set this all up:
    https://wiki.archlinux.org/index.php/Be … ide#Locale
    Last edited by weirddan455 (2013-05-17 04:21:38)

  • Locale not supported by C library [solved]

    When running a xdialog script, I am getting this error.
    Gdk-WARNING **: locale not supported by C library
    Example:
    #!/bin/sh
    Xdialog --title "TEST BOX"
    --msgbox "Hi, this is a simple message box. You can use this to
    display any message you like. The box will remain until
    you press the ENTER key." 10 41
    case $? in
    0)
    echo "OK";;
    255)
    echo "Box closed.";;
    esac

    phrakture wrote:The "locale not supported" message means you did not generate the locale info for the locale you're running under.
    For my information, where its said to do this? When installing a fresh install and all packages updated, the locale problem is there. Is this a bug or something what everyone supposed to know?
    Why the default locale configure is not enough in /etc/rc.conf, why to bother about /etc/locale.gen?
    rc.conf wrote:LOCALE="en_US.utf8"
    EDIT:
    I took a look at /etc/locale.gen. I don't know what to uncomment, its like reading a foreign language.

  • Locale not supported by C library?

    Hi,
    When trying concky or lxappearance the terminal says:
    Gdk-WARNING **: locale not supported by C library
    Using the fallback 'C' locale
    What have I done wrong or what have I missed?

    http://wiki.archlinux.org/index.php/Locale

  • Locale not supported

    I updated tarantella native client to
    version 3.42 for solaris2.8.
    Now I get the error message
    <Failed to process Tarantella server information>
    at login. (version 3.3 works fine)
    The command line shows warnings:
    Warning: locale not supported by Xlib, locale set to C
    Warning: X locale modifiers not supported, using default
    It seems to be problem with locale settings, already described in a
    previous newsgroup posting.
    Setting LANG=en_GB (or other values) did not help.
    Where I can get correct locale-files?
    (Not included in the client distributions)
    Thanks a lot,
    JU

    Please check your Apache Logfile.
    The first connect to SGD by NC is to the Web Server. NC requested
    serverinfo.html
    Try in a Webbrowser:
    http://<servername>/tarantella/cgi-bin/ttawebtop.cgi/tarantella/resources/login/sco/tta/boot/serverinfo.html
    You will get an empty page. Look into the Source code of this empty page.
    It show something like:
    <html><head>
    <!-- $Id: serverinfo.html,v 1.13 2003/07/25 07:55:31 peterc Exp $ -->
    <!-- This is an identification page for the Tarantella server -->
    <title>Tarantella server information</title>
    <!-- AsadPort=3144 -->
    <!-- NonSecurePort=3144 -->
    <!-- Version=3.45.201 -->
    <!-- ServerDNS=serverDNSName-->
    <!-- WebtopKeepAlive=100 -->
    <!-- AIPKeepAlive=300 -->
    <!-- FirewallTraversal=false -->
    <!-- ProxyServer= -->
    <!-- ConnectionHost=ServerDNSName-->
    <!-- Utf8Strings=1 -->
    <!-- BaseRoute= -->
    </html>
    This is the information NC needs to connect to your SGDEE Server.
    Check you can telnet to ConnectionHost Port AsadPort
    TAB
    "juschlue" <[email protected]> schrieb im Newsbeitrag
    news:[email protected]...
    Thank you for the solution that helped to solve
    the locale problem. Unfortunally there is still
    the error
    <Failed to process Tarantella server information>
    after approx. 20sec during login.
    Our previous version 3.20 works correct
    with the same server/login/pw.
    Is there a way to identify (debug) the problem.
    Thank you very much,
    Jens-Uwe
    Tillmann Basien wrote:
    This is my answer to this issue:
    http://www.tbsol.de/de/modules/news/article.php?storyid=64
    TAB
    \"juschlue\" <[email protected]> schrieb im Newsbeitrag
    news:[email protected]...
    I updated tarantella native client to
    version 3.42 for solaris2.8.
    Now I get the error message
    <Failed to process Tarantella server information>
    at login. (version 3.3 works fine)
    The command line shows warnings:
    Warning: locale not supported by Xlib, locale set to C
    Warning: X locale modifiers not supported, using default
    It seems to be problem with locale settings, already described in a
    previous newsgroup posting.
    Setting LANG=en_GB (or other values) did not help.
    Where I can get correct locale-fil
    es?
    (Not included in the client distributions)
    Thanks a lot,
    JU

  • Locale not supported problem

    Hi, I´m an Italian Ubuntu user who is trying to feel new experiences with awesome distros
    I´ve got a problem when trying to run archibald:
    # ./archibald
    (gksu:3489): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.
    I´ve already read other posts that explain how to fix this problem, but it didn´t work for me.
    My locale -a output:
    # locale -a
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    C
    POSIX
    en_IE
    en_IE.iso88591
    en_IE.iso885915@euro
    en_IE.utf8
    en_IE@euro
    en_US
    en_US.iso88591
    en_US.utf8
    it_CH
    it_CH.iso88591
    it_CH.utf8
    it_IT
    it_IT.iso88591
    it_IT.iso885915@euro
    it_IT.utf8
    it_IT@euro
    italian
    As you see, I tried to install all English and all Italian locales, but the error remains
    Could someone help me, please?

    # locale
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    LANG=it_IT@EURO
    LC_CTYPE="it_IT@EURO"
    LC_NUMERIC="it_IT@EURO"
    LC_TIME="it_IT@EURO"
    LC_COLLATE=C
    LC_MONETARY="it_IT@EURO"
    LC_MESSAGES="it_IT@EURO"
    LC_PAPER="it_IT@EURO"
    LC_NAME="it_IT@EURO"
    LC_ADDRESS="it_IT@EURO"
    LC_TELEPHONE="it_IT@EURO"
    LC_MEASUREMENT="it_IT@EURO"
    LC_IDENTIFICATION="it_IT@EURO"
    LC_ALL=
    Thanks!

  • [Solved] Gtk-WARNING **: Locale not supported by C library

    Hi all,
    Since the gnome 3.2 update I have the following error while working on the terminal:
    "Gtk-WARNING **: Locale not supported by C library"
    I have follow the wiki but nothing change, any idea?
    Regards,
    Last edited by sweetthdevil (2011-10-07 16:48:52)

    fixed - the problem was with the system settings > Region and language
    All needed to be set there...

  • Gdk-WARNING **: locale not supported by C library

    How I can set LC_CTYPE in ArchLinux.
    When I try to run apps with. I get warning and not get unicode support.
    $ env LC_CTYPE=en_US.UTF-8 some_app   
    (process:1256): Gdk-WARNING **: locale not supported by C library
    (process:1256): Gtk-WARNING **: Locale not supported by C library.
            Using the fallback 'C' locale.

    phrakture wrote:The "locale not supported" message means you did not generate the locale info for the locale you're running under.
    For my information, where its said to do this? When installing a fresh install and all packages updated, the locale problem is there. Is this a bug or something what everyone supposed to know?
    Why the default locale configure is not enough in /etc/rc.conf, why to bother about /etc/locale.gen?
    rc.conf wrote:LOCALE="en_US.utf8"
    EDIT:
    I took a look at /etc/locale.gen. I don't know what to uncomment, its like reading a foreign language.

  • Gtk-WARNING **: Locale not supported by C library.

    Hi, I'm pretty new to Linux and I could really use some help on this one! This is my second Arch install. After the first, which I installed to learn about Linux,  I figured there'd be more user-friendly and complete distro's (like SUSE, Debian, etc.). I was wrong
    Anyway, this is my second install, but ever since I installed it (and X11, ati-fglrx, gnome and gnome-extra) certain apps give my this error when run from a console. All of them start and work perfectly, except one: gnome-keyboard-properties. I fails to run and starts a bug buddy report window, while outputting the following messages on the console:
    [***@*** ~]$ gnome-keyboard-properties
    (gnome-keyboard-properties:4727): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.
    (gnome-keyboard-properties:4727): Gdk-WARNING **: locale not supported by C library
    (gnome_segv2:4728): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.
    (gnome_segv2:4728): Gdk-WARNING **: locale not supported by C library
    (bug-buddy:4729): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.
    (bug-buddy:4729): Gdk-WARNING **: locale not supported by C library
    ** (bug-buddy:4729): WARNING **: Couldn't load icon for Open Folder
    Failed to read a valid object file image from memory.
    I've generated the en_US.utf8 locale using locale-gen, edited rc.conf accordingly and I used the hwd-generated keyboard entry for xorg.conf that worked on my previous install.
    I've been trying things with my xorg.conf. I used to leave XkbLayout and XkbVariant empty, like in the hwd-generated example, but now I'm using this:
    Section "InputDevice"
    Identifier "Cherry"
    Driver "keyboard"
    Option "CoreKeyboard"
    Option "XkbRules" "xorg"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "us"
    Option "XkbVariant" "intl"
    EndSection
    This has a noticable effect: both ' and " require an extra spacebar hit. Pretty anoying, but this at least shows is had effect on gnome. Also, the Keyboard Indicator Applet shows the layout correctly.
    I've tried other things, like uninstalling gnome and gnome-extra using pacman -Rnd as to leave no trace, and reïnstalling it. And I can't find anything on Google...
    PS I'm running this on an athlon64 with a radeon x700, ftp-install from a 0.7.2 i686 base CD.

    I've done a total reïnstall - again. gnome-keyboard-properties works again! However, I still get these errors when opening Gtk-apps:
    (gksu:4669): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.
    I've left xorg.conf's XkbLayout emply, which defaults to "us". There's a related option called "KEYMAP" in rc.conf, which has "us" as default, too. As I said, gnome-keyboard-properties now works and correctly displays "Generic 105-key.." etc. and "U.S. English".
    I think I now have /etc/hosts' loopback correctly setup:
    127.0.0.1 localhost.localdomain myhostname
    192.168.x.xxx myhostname.localdomain myhostname
    I'm really out of ideas here. Does anyone know whether this is normal or harmful?
    [[ EDIT ]]
    Solved. I actually forgot to generate the locales this time. I don't know what it was last time...
    Last edited by ppvg (2007-02-05 21:21:21)

  • Lion Server VPN, Can Connect Locally, Not Remotely

    I have both Lion and Lion Server installed on my Core 2 Duo iMac, mainly because I want the VPN feature of Server.
    I configured everything correctly for the VPN, and can connect to it with no problems from my iPhone and iPad when I am within my own LAN (the server and the iPhone/iPad are on the same IP range and subnet).
    I also used the automatic config within the Server app to configure my AirPort Extreme N Base Station.   Looking at the Port Mapping section of my ABS from within AirPort Utility, I do in fact see that VPN Service (L2TP) is configured with the following UDP ports: 500, 1701 and 4500.  Those ports ARE pointing to the iMac that is running the VPN server.  Firewall on that iMac is turned OFF.
    However, I am unable to connect my iPhone to the VPN Server using my Public IP address.  I have tried it from within my network (out of network to internet the back), from my Verizon MiFi or from my iPhone's 3G connection (well, in my area it is still Edge).  The iPhone simply sits on "Connecting" for a few seconds, then an alert comes up stating "The L2TP-VPN server did not respond.  Try reconnecting. If the problem..." yadada.
    I AM, however, able to get Web Sharing to work via my Public IP address, as well as VNC.
    I also cannot connect to the VPN via the Public IP with other devices like my iBook, PowerBook G4, Windows 7 PC, or iMac G5.  They ALL CAN connect via the local network 10.1.x.x IP address.
    Am I missing something here?  I did all of the automatic configurations, and all of the ports appear to be properly open.

    Not in my case, Per, no.
    I just did a tcpdump between various systems.
    For those that do NOT work (client iPhone, client 10.7 and server 10.7) the tcpdumps look like so:
    19:12:33.883057 IP Home.60845 > LionServer.500: isakmp: phase 1 I ident
    19:12:33.884410 IP LionServer.500 > Home.60845: isakmp: phase 1 R ident
    19:12:33.910379 IP Home.60845 > LionServer.500: isakmp: phase 1 I ident
    19:12:33.918362 IP LionServer.500 > Home.60845: isakmp: phase 1 R ident
    19:12:33.958995 IP Home.60846 > LionServer.4500: NONESP-encap: isakmp: phase 1 I ident[E]
    19:12:33.959349 IP LionServer.4500 > Home.60846: NONESP-encap: isakmp: phase 1 R ident[E]
    19:12:33.959461 IP LionServer.4500 > Home.60846: NONESP-encap: isakmp: phase 2/others R inf[E]
    19:12:34.997414 IP Home.60846 > LionServer.4500: NONESP-encap: isakmp: phase 2/others I oakley-quick[E]
    19:12:34.998323 IP LionServer.4500 > Home.60846: NONESP-encap: isakmp: phase 2/others R oakley-quick[E]
    19:12:35.016983 IP Home.60846 > LionServer.4500: NONESP-encap: isakmp: phase 2/others I oakley-quick[E]
    19:12:35.019173 IP Home.60846 > LionServer.4500: UDP-encap: ESP(spi=0x041b007d,seq=0x1), length 132
    19:12:35.052641 IP LionServer.500 > Home.500: isakmp: phase 1 I ident
    19:12:35.595022 IP Home.60846 > LionServer.4500: UDP-encap: ESP(spi=0x041b007d,seq=0x2), length 132
    19:12:37.597957 IP Home.60846 > LionServer.4500: UDP-encap: ESP(spi=0x041b007d,seq=0x3), length 132
    19:12:38.212127 IP LionServer.500 > Home.500: isakmp: phase 1 I ident
    19:12:41.214447 IP LionServer.500 > Home.500: isakmp: phase 1 I ident
    19:12:41.603061 IP Home.60846 > LionServer.4500: UDP-encap: ESP(spi=0x041b007d,seq=0x4), length 132
    19:12:44.216935 IP LionServer.500 > Home.500: isakmp: phase 1 I ident
    19:12:45.609900 IP Home.60846 > LionServer.4500: UDP-encap: ESP(spi=0x041b007d,seq=0x5), length 132
    19:12:49.616860 IP Home.60846 > LionServer.4500: UDP-encap: ESP(spi=0x041b007d,seq=0x6), length 132
    19:12:53.623054 IP Home.60846 > LionServer.4500: UDP-encap: ESP(spi=0x041b007d,seq=0x7), length 132
    19:12:54.965357 IP Home.60846 > LionServer.4500: isakmp-nat-keep-alive
    19:12:55.032098 IP Home.60846 > LionServer.4500: NONESP-encap: isakmp: phase 2/others I inf[E]
    19:12:55.036420 IP Home.60846 > LionServer.4500: NONESP-encap: isakmp: phase 2/others I inf[E]
    19:12:56.228356 IP LionServer.500 > Home.500: isakmp: phase 1 I ident
    Note: I've done this over wired and wireless as well as 3G -- the transport on the client end is NOT the issue.
    A connection that works, from iPhone ONLY (on 3G or Wireless) is:
    11:24:59.960105 IP Home.61168 > LeopardServer.500: isakmp: phase 1 I ident
    11:24:59.964119 IP LeopardServer.500 > Home.61168: isakmp: phase 1 R ident
    11:25:00.673976 IP Home.61168 > LeopardServer.500: isakmp: phase 1 I ident
    11:25:00.712858 IP LeopardServer.500 > Home.61168: isakmp: phase 1 R ident
    11:25:01.466127 IP Home.61169 > LeopardServer.4500: NONESP-encap: isakmp: phase 1 I ident[E]
    11:25:01.468180 IP LeopardServer.4500 > Home.61169: NONESP-encap: isakmp: phase 1 R ident[E]
    11:25:01.468546 IP LeopardServer.4500 > Home.61169: NONESP-encap: isakmp: phase 2/others R inf[E]
    11:25:02.954797 IP Home.61169 > LeopardServer.4500: NONESP-encap: isakmp: phase 2/others I oakley-quick[E]
    11:25:02.978314 IP LeopardServer.4500 > Home.61169: NONESP-encap: isakmp: phase 2/others R oakley-quick[E]
    11:25:03.480886 IP Home.61169 > LeopardServer.4500: NONESP-encap: isakmp: phase 2/others I oakley-quick[E]
    11:25:03.486763 IP Home.61169 > LeopardServer.4500: UDP-encap: ESP(spi=0x0a46a01f,seq=0x1), length 116
    11:25:04.032382 IP Home.61169 > LeopardServer.4500: UDP-encap: ESP(spi=0x0a46a01f,seq=0x2), length 116
    11:25:06.029801 IP Home.61169 > LeopardServer.4500: UDP-encap: ESP(spi=0x0a46a01f,seq=0x3), length 116
    11:25:06.517111 IP LeopardServer.4500 > Home.61169: UDP-encap: ESP(spi=0x088d7e27,seq=0x1), length 116
    11:25:06.742918 IP LeopardServer.4500 > Home.61169: UDP-encap: ESP(spi=0x088d7e27,seq=0x2), length 116
    And from there it's all normal.
    What never works:
    10.7 client to 10.7 server
    iPhone to 10.7 server
    The breakage seems to happen on 10.7 server here:
    19:12:35.019173 IP Home.60846 > LionServer.4500: UDP-encap: ESP(spi=0x041b007d,seq=0x1), length 132
    19:12:35.052641 IP LionServer.500 > Home.500: isakmp: phase 1 I ident
    After that first ESP packet, the Lion Server responds with another phase 1 ident.
    The Leopard server does not.
    It may still be something in my setup, but, there's nothing to configure on 10.7 server other than "on" and "off" and some IP addresses, which I'm nearly certain isn't the issue...but who knows.   Either the Lion Server ignores whatever is in that ESP packet, and starts over, or, iOS and OS X are sending it something it doesn't like and is forcing it to reset and start over.

  • Java.util.Locale not thread-safe !

    In multithreading programming, we know that double-checking idiom is broken. But lots of code, even in sun java core libraries, are written using this idiom, like the class "java.util.Locale".
    I have submitted this bug report just now,
    but I wanted to have your opinion about this.
    Don't you think a complete review of the source code of the core libraries is necessary ?
    java.util.Locale seems not to be thread safe, as I look at the source code.
    The static method getDefault() is not synchronized.
    The code is as follows:
    public static Locale getDefault() {
    // do not synchronize this method - see 4071298
    // it's OK if more than one default locale happens to be created
    if (defaultLocale == null) {
    // ... do something ...
    defaultLocale = new Locale(language, country, variant);
    return defaultLocale;
    This method seems to have been synchronized in the past, but the bug report 4071298 removed the "synchronized" modifier.
    The problem is that for multiprocessor machines, each processor having its own cache, the data in these caches are never synchronized with the main memory.
    The lack of a memory barrier, that is provided normally by the "synchronized" modifier, can make a thread read an incompletely initialized Locale instance referenced by the static private variable "defaultlocale".
    This problem is well explained in http://www.javaworld.com/javaworld/jw-02-2001/jw-0209-double.html and other documents about multithreading.
    I think this method must just be synchronized again.

    Shankar, I understand that this is something books and articles about multithreading don't talk much about, because for marketing reasons, multithreading is supposed to be very simple.
    It absolutely not the case.
    Multithreading IS a most difficult topic.
    First, you must be aware that each processor has its own high-speed cache memory, much faster than the main memory.
    This cache is made of a mixture of registers and L1/L2/L3 caches.
    Suppose we have a program with a shared variable "public static int a = 0;".
    On a multiprocessor system, suppose that a thread TA running on processor P1 assign a value to this variable "a=33;".
    The write is done to the cache of P1, but not in the main memory.
    Now, a second thread TB running on processor P2 reads this variable with "System.out.prinln(a);".
    The value of "a" is retrieved from main memory, and is 0 !
    The value 33 is in the cache of P1, not in main memory where its value is still 0, because the cache of P1 has not been flushed.
    When you are using BufferedOutputStream, you use the "flush()" method to flush the buffer, and the "synch()" method to commit data to disk.
    With memory, it is the same thing.
    The java "synchronized" keyword is not only a streetlight to regulate traffic, it is also a "memory barrier".
    The opening brace "{" of a synchronized block writes the data of the processor cache into the main memory.
    Then, the cache is emptied, so that stale values of other data don't remain here.
    Inside the "synchronized" block, the thread must thus retrieve fresh values from main memory.
    At the closing brace "}", data in the processor cache is written to main memory.
    The word "synchronized" has the same meaning as the "sync()" method of FileDescriptor class, which writes data physically to disk.
    You see, it is really a cache communication problem, and the synchronized blocks allows us to devise a kind of data transfer protocol between main memory and the multiple processor local caches.
    The hardware does not do this memory reconciliation for you. You must do it yourself using "synchronized" block.
    Besides, inside a synchronized block, the processor ( or compiler ) feels free to write data in any order it feels most appropriate.
    It can thus reorder assignments and instruction.
    It is like the elevator algorithm used when you store data into a hard disk.
    Writes are reordered so that they can be retrieved more efficiently by one sweep or the magnetic head.
    This reordering, as well as the arbitrary moment the processor decides to reconciliate parts of its cache to main memory ( if you don't use synchronized ) are the source of the problem.
    A thread TB on processor P2 can retrieve a non-null pointer, and retrieve this object from main memory, where it is not yet initialized.
    It has been initialized in the cache of P1 by TA, though, but TB doen't see it.
    To summarize, use "synchronized" every time you access to shared variables.
    There is no other way to be safe.
    You get the problem, now ?
    ( Note that this problem has strictly nothing to do with the atomicity issue, but most people tend to mix the two topics...
    Besides, as each access to a shared variable must be done inside a synchronized block, the issue of atomicity is not important at all.
    Why would you care about atomicity if you can get a stale value ?
    The only case where atomicity is important is when multiple threads access a single shared variable not in synchronized block. In this case, the variable must be declared volatile, which in theory synchronizes main and cache memory, and make even long and double atomic, but as it is broken in lots of implementation, ... )

  • [sysvinit, NOT systemd] Commands in rc.local not executed

    Hello Community,
    I'm using the common sysvinit initscripts, so the following problem should not be related to systemd.
    I just made some powersaving settings as advised in https://wiki.archlinux.org/index.php/Powertop in /etc/rc.local, so for example
    echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
    After rebooting I checked the settings and found...
    $ cat /sys/class/scsi_host/host0/link_power_management_policy
    max_performance
    This is my complete rc.local file:
    #!/bin/bash
    # /etc/rc.local: Local multi-user startup script.
    # Keep dirty writes in memory
    echo 90 > /proc/sys/vm/dirty_ratio
    # Keep dirty writes out of cache
    echo 5 > /proc/sys/vm/dirty_background_ratio
    # VM writeback timeout
    echo 6000 > /proc/sys/vm/dirty_writeback_centisecs
    # SATA Active Link Powermanagement
    echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
    # set Advanced Power Management feature
    hdparm -B 128 /dev/sda
    The upper "echo" commands aren't executed, as well as the SATA Active Link Powermanagement.
    Strange enough, but the hdparm command seems to be executed. I see the output in the boot messages and in /var/log/boot:
    Wed Sep 5 13:11:22 2012: /dev/sda:
    Wed Sep 5 13:11:22 2012: setting Advanced Power Management level to 0x80 (128)
    Wed Sep 5 13:11:23 2012: APM_level = 128
    Does anybody have a clue, why the "echo" commands aren't executed while the hdparm is?
    Any hint would really be appreciated!

    indianahorst wrote:
    Hello Community,
    I'm using the common sysvinit initscripts, so the following problem should not be related to systemd.
    I just made some powersaving settings as advised in https://wiki.archlinux.org/index.php/Powertop in /etc/rc.local, so for example
    echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
    After rebooting I checked the settings and found...
    $ cat /sys/class/scsi_host/host0/link_power_management_policy
    max_performance
    This is my complete rc.local file:
    #!/bin/bash
    # /etc/rc.local: Local multi-user startup script.
    # Keep dirty writes in memory
    echo 90 > /proc/sys/vm/dirty_ratio
    # Keep dirty writes out of cache
    echo 5 > /proc/sys/vm/dirty_background_ratio
    # VM writeback timeout
    echo 6000 > /proc/sys/vm/dirty_writeback_centisecs
    # SATA Active Link Powermanagement
    echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
    # set Advanced Power Management feature
    hdparm -B 128 /dev/sda
    The upper "echo" commands aren't executed, as well as the SATA Active Link Powermanagement.
    Strange enough, but the hdparm command seems to be executed. I see the output in the boot messages and in /var/log/boot:
    Wed Sep 5 13:11:22 2012: /dev/sda:
    Wed Sep 5 13:11:22 2012: setting Advanced Power Management level to 0x80 (128)
    Wed Sep 5 13:11:23 2012: APM_level = 128
    Does anybody have a clue, why the "echo" commands aren't executed while the hdparm is?
    Any hint would really be appreciated!
    What desktop do you use? Specifically, do you run upower? This seems to be related to upower's call to pm-powersave which would turn on high-performance settings when running on AC...
    FWIW, here is my rc.local
    . /etc/rc.conf
    . /etc/rc.d/functions
    echo "Entering rc.local"
    stat_busy "Setting WiFi powersave"
    iw dev wlan0 set power_save on
    if [ $? -gt 0 ]; then
    stat_fail
    else
    stat_done
    fi
    stat_busy "Setting CPU and SCSI powersavings"
    echo 99 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
    for h in /sys/class/scsi_host/host?; do
    if [ -f $h/link_power_management_policy ]; then
    echo "min_power" > $h/link_power_management_policy
    fi
    done
    stat_done
    stat_busy "Remount /dev/shm noexec"
    mount -o remount,noexec /dev/shm
    if [ $? -gt 0 ]; then
    stat_fail
    else
    stat_done
    fi
    and
    $ for h in /sys/class/scsi_host/host?; do cat $h/link_power_management_policy; done
    min_power
    min_power
    min_power
    min_power

  • MP3 Stream Works Locally, Not Online

    Hello,
    New to Flash development, I'm building a MP3 player, and have
    started with a very simple version (as the attached code shows).
    The player works perfectly when I direct my browser (either
    IE or FF) to the files stored locally on my hard drive.
    However, when I upload everything to a shared host Web
    server, the Flash object loads fine, but clicking the Play button
    doesn't do anything.
    To keep things simple, I stored all of the Flash published
    files and the MP3 file in the same directory, so I'd be surprised
    if it's a file path issue.
    The "sound.mp3" file is 1 minute, 39 seconds at stereo
    192Kbps, 44kHz. Is it a buffering issue?
    I am using the 30 day trial of Flash CS3, if that matters.
    Any assistance in helping me resolve this is greatly
    appreciated.

    Never mind. I figured it out. Case sensitivity.
    In the attached code, I changed the name of the MP3 file to
    the generic sound.mp3. The real file name, however, contains
    capital letters. The code referring to that file did not. That
    works fine on Windows file system, not UNIX.

Maybe you are looking for

  • Issues with ODI connection to Hyperion Financial Management

    Hi, I am having some issues with ODI connection to Hyperion Financial Management. ODI and Financial management are setup on different machines. The 'Cluster(Data Server)' name in Topology is given as 'hfm03cl'. On reverse-engineering a model it gives

  • Calling a form from OAF Page

    One of my client is currently trying the following based on the instructions on page 331 of the "Oracle Application Framework Developer's Guide Release 11.5.10 RUP4 July 2006". To open a D2K form from an OA Framework page -> Trying to pass a paramete

  • How to edit raw files in lightroom?

    when editing raw files in  lightroom the only extra option I seem to get is more control over white balance.  Am I missing something?  is there a way to open raw files in camera raw (like in photoshop elements) or can the editing options I get for al

  • Re: Unit Tests with Jemmy

    I have a need for running headless beyond just for testing. I'd like to make a library that uses JavaFX properties/tasks that can either run headless, or can use the same tasks to run in a GUI that can display the progress info generated by the tasks

  • Cleaning Up Files?

    I've got a monitoring windows box that has grid control installed on it. I'm using the 11.2.0.2 database with weblogic. - I think the grid control is 11.1.0.1.0. This is taking up 19 gigs of space. Is this normal? Are there log files that I'm missing